Quick correction, so that event or orga submitter is automatically filled with contact email if blank

This commit is contained in:
echarp 2015-10-22 22:28:25 +02:00
parent 3387a38bda
commit 41758e0330
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ class Event < ActiveRecord::Base
self.decision_time = Time.zone.now self.decision_time = Time.zone.now
# Populate submitter using contact info if absent # Populate submitter using contact info if absent
self.submitter ||= contact self.submitter = contact if submitter.blank?
end end
before_validation on: :update do before_validation on: :update do

View File

@ -21,7 +21,7 @@ class Orga < ActiveRecord::Base
self.submission_time ||= Time.zone.now self.submission_time ||= Time.zone.now
# Populate submitter using contact info if absent # Populate submitter using contact info if absent
self.submitter ||= contact self.submitter = contact if submitter.blank?
end end
after_create do after_create do