Skip to content

Commit

Permalink
need to remove uniqueness validation for create_or_find_by to work
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Dec 13, 2023
1 parent 3b75782 commit e4278a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/admin/oral_history_requester_email.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class Admin::OralHistoryRequesterEmail < ApplicationRecord

self.filter_attributes += [ :email ]

validates :email, presence: true, uniqueness: true
# we don't have uniqueness validation cause it's incompatible with using create_or_find_by which
# we want to.
validates :email, presence: true

has_many :oral_history_access_requests
end

0 comments on commit e4278a1

Please sign in to comment.