use event_type from last event from the loop, fix backtrace when updating a speakerproposal which has more than one eventproposal of the same type
This commit is contained in:
parent
5fa07f130a
commit
939d17c8bd
|
@ -212,7 +212,8 @@ class SpeakerProposalUpdateView(
|
||||||
for ep in self.get_object().eventproposals.all():
|
for ep in self.get_object().eventproposals.all():
|
||||||
eventtypes.add(ep.event_type)
|
eventtypes.add(ep.event_type)
|
||||||
if len(eventtypes) == 1:
|
if len(eventtypes) == 1:
|
||||||
eventtype = self.get_object().eventproposals.get().event_type
|
# only one eventtype found
|
||||||
|
eventtype = ep.event_type
|
||||||
else:
|
else:
|
||||||
# more than one type of event for this person, return the generic speakerproposal form
|
# more than one type of event for this person, return the generic speakerproposal form
|
||||||
eventtype = None
|
eventtype = None
|
||||||
|
|
Loading…
Reference in a new issue