Fix bug w/ proposal submissions

This commit is contained in:
Matt Barringer 2013-02-06 20:17:54 +01:00
parent 9b1704fad6
commit a8e2cd4ef9

View file

@ -62,7 +62,14 @@ class Event < ActiveRecord::Base
if !result.nil?
result.person
else
nil
person = nil
# Perhaps the event_people haven't been saved, if this is a new proposal
self.event_people.each do |p|
if p.event_role == "submitter"
person = p.person
end
end
person
end
end
def as_json(options)