mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-25 01:04:02 +08:00
Add unique validation for user assignements [SCI-6279] (#3680)
This commit is contained in:
parent
8545b5787f
commit
ca5a81a85c
1 changed files with 2 additions and 0 deletions
|
@ -7,4 +7,6 @@ class UserAssignment < ApplicationRecord
|
|||
belongs_to :assigned_by, class_name: 'User', optional: true
|
||||
|
||||
enum assigned: { automatically: 0, manually: 1 }, _suffix: true
|
||||
|
||||
validates :user, uniqueness: { scope: :assignable }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue