mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fix failing validation in Registration
In the conference is not set, validation that the call for paper is accepted breaks. This made the conference association test failing.
This commit is contained in:
parent
998dc0927b
commit
ca574ae2af
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ class Registration < ApplicationRecord
|
|||
validate :registration_to_events_only_if_present
|
||||
|
||||
validates :accepted_code_of_conduct, acceptance: {
|
||||
if: -> { conference.code_of_conduct.present? }
|
||||
if: -> { conference.try(:code_of_conduct).present? }
|
||||
}
|
||||
|
||||
after_create :set_week, :subscribe_to_conference, :send_registration_mail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue