Putting back some element of event construction, which was used in some scripts

This commit is contained in:
echarp 2020-02-09 16:46:47 +01:00
parent 6138156eb6
commit 59de7c9e5c
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ class Event < ApplicationRecord
before_validation on: :create do before_validation on: :create do
self.submission_time = Time.zone.now self.submission_time = Time.zone.now
self.decision_time = Time.zone.now self.decision_time = Time.zone.now
# Populate submitter using contact info if absent
self.submitter ||= contact
end end
before_validation on: :update do before_validation on: :update do