diff options
author | ThibG <thib@sitedethib.com> | 2020-12-20 18:25:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 18:25:00 +0100 |
commit | 7bf3c6e57b52cd9390f2140a1cc17292c281aacf (patch) | |
tree | adde2393c2ba14cc18368670a058802c57b6dc45 /app/models/poll.rb | |
parent | 9734c9b6fe2d2e4a980d8ad94c5de0300b23c809 (diff) |
Fix AccountDeletionWorker crashing and clogging sidekiq queues (#15380)
* Fix account deletion workers being queued multiple times for a single account * Fix poll votes being unnecessarily instantiated on poll deletion * Fix favourites being unnecessarily instantiated on status deletion * Remove inaccurate comments * Delete polls instead of destroying them Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/models/poll.rb')
-rw-r--r-- | app/models/poll.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/poll.rb b/app/models/poll.rb index b5deafcc2..e1ca55252 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -25,7 +25,7 @@ class Poll < ApplicationRecord belongs_to :account belongs_to :status - has_many :votes, class_name: 'PollVote', inverse_of: :poll, dependent: :destroy + has_many :votes, class_name: 'PollVote', inverse_of: :poll, dependent: :delete_all has_many :notifications, as: :activity, dependent: :destroy |