Skip to content

Commit df40b30

Browse files
Add note to uniqueness checks in registration
1 parent b2ced2f commit df40b30

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
@@ -28,6 +28,8 @@ class Registration < ApplicationRecord
2828

2929
validates :user, uniqueness: { scope: :exam_version }
3030

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

0 commit comments

Comments
 (0)