Use the existing event type if there is one and one is not defined.

This commit is contained in:
Víðir Valberg Guðmundsson 2018-08-21 13:47:56 +02:00
parent f2b7ad63ca
commit 09e916571e

View file

@ -187,6 +187,8 @@ class EventProposalForm(forms.ModelForm):
eventproposal.event_type = event_type eventproposal.event_type = event_type
eventproposal.save() eventproposal.save()
if not event_type and hasattr(eventproposal, 'event_type'):
event_type = eventproposal.event_type
if self.cleaned_data.get('slides_url') and event_type.name in ['Talk', 'Lightning Talk']: if self.cleaned_data.get('slides_url') and event_type.name in ['Talk', 'Lightning Talk']:
url = self.cleaned_data.get('slides_url') url = self.cleaned_data.get('slides_url')