diff --git a/app/models/poll/shift.rb b/app/models/poll/shift.rb index cc5f7045e..7fc5e09d1 100644 --- a/app/models/poll/shift.rb +++ b/app/models/poll/shift.rb @@ -5,9 +5,8 @@ class Poll validates :booth_id, presence: true validates :officer_id, presence: true - validates :date, presence: true + validates :date, presence: true, uniqueness: { scope: [:officer_id, :booth_id, :task] } validates :task, presence: true - validates :date, uniqueness: { scope: [:officer_id, :booth_id, :task] } enum task: { vote_collection: 0, recount_scrutiny: 1 }