The personal finance app for everyone (by everyone)
Ruby
fix(destroy): prevent UnknownAttributeError in DestroyJob rescue (#1852)
sentry[bot]1f7970010aff
diff --git a/app/jobs/destroy_job.rb b/app/jobs/destroy_job.rbindex 8b5622423b..ba937e61f2 100644--- a/app/jobs/destroy_job.rb+++ b/app/jobs/destroy_job.rb@@ -5,6 +5,6 @@ class DestroyJob < ApplicationJobdef perform(model)model.destroyrescue => e- model.update!(scheduled_for_deletion: false) # Let's the user try again by resetting the state+ model.update!(scheduled_for_deletion: false) if model.respond_to?(:scheduled_for_deletion) # Let's the user try again by resetting the stateendenddiff --git a/app/models/sync.rb b/app/models/sync.rbindex cc09b9ffd0..e2ec1f28a2 100644--- a/app/models/sync.rb+++ b/app/models/sync.rb@@ -250,6 +250,8 @@ class Sync < ApplicationRecordenddef update_family_sync_timestamp+ return unless family.persisted?+family.touch(:latest_sync_activity_at)end