diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/poll.rb | 2 | ||||
-rw-r--r-- | app/models/status.rb | 2 |
2 files changed, 2 insertions, 2 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 diff --git a/app/models/status.rb b/app/models/status.rb index 96d90e1c2..f1b3b75ce 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -56,7 +56,7 @@ class Status < ApplicationRecord belongs_to :thread, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :replies, optional: true belongs_to :reblog, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblogs, optional: true - has_many :favourites, inverse_of: :status, dependent: :destroy + has_many :favourites, inverse_of: :status, dependent: :delete_all has_many :bookmarks, inverse_of: :status, dependent: :destroy has_many :reblogs, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblog, dependent: :destroy has_many :replies, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :thread |