about summary refs log tree commit diff
path: root/app/models/list_account.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/list_account.rb')
-rw-r--r--app/models/list_account.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/list_account.rb b/app/models/list_account.rb
index c08239aa0..253932590 100644
--- a/app/models/list_account.rb
+++ b/app/models/list_account.rb
@@ -14,6 +14,8 @@ class ListAccount < ApplicationRecord
   belongs_to :account, required: true
   belongs_to :follow, required: true
 
+  validates :account_id, uniqueness: { scope: :list_id }
+
   before_validation :set_follow
 
   private