Skip to content

Commit d0c7b42

Browse files
committed
Add note to uniqueness checks in registration
1 parent e7bd0ca commit d0c7b42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/models/registration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class Registration < ApplicationRecord
2626

2727
validates :user, uniqueness: { scope: :exam_version }
2828

29+
# note: we are not sure whether the current reg will show up in the association,
30+
# so this validation remains separate from the previous uniqueness check
2931
validate :user_exam_uniqueness
3032
def user_exam_uniqueness
3133
other_reg_exists =

0 commit comments

Comments
 (0)