diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-31 02:10:39 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | 4c47a96f67d303dec7b6047474380050053ac3d7 (patch) | |
tree | 93a3a6ca46bab8e6cbac035bb866a86893cf1686 /app/models/status_mute.rb | |
parent | a036e8561344866b072c2874906c9c9533cd27ea (diff) |
[Database, Models] Add missing uniqueness validations
Diffstat (limited to 'app/models/status_mute.rb')
-rw-r--r-- | app/models/status_mute.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/status_mute.rb b/app/models/status_mute.rb index 0d7f9ec78..223893604 100644 --- a/app/models/status_mute.rb +++ b/app/models/status_mute.rb @@ -11,6 +11,8 @@ class StatusMute < ApplicationRecord include Cacheable + validates :account_id, uniqueness: { scope: :status_id } + belongs_to :account, inverse_of: :status_mutes belongs_to :status, inverse_of: :mutes |