Skip to content

Commit

Permalink
Guard for missing identity
Browse files Browse the repository at this point in the history
  • Loading branch information
miharekar committed Nov 23, 2024
1 parent 372cd3f commit 8b3cba8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/jobs/airtable_upload_all_job.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class AirtableUploadAllJob < AirtableJob
def perform(user, shot_ids = nil)
identity = user.identities.find_by(provider: "airtable")
return unless identity

if identity.valid_token?
if user.coffee_management_enabled?
Airtable::Roasters.new(user).upload_multiple(user.roasters.where(airtable_id: nil))
Expand Down

0 comments on commit 8b3cba8

Please sign in to comment.