From 09e916571ec1d791a4bc20e9821f4bd96c6c8d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Tue, 21 Aug 2018 13:47:56 +0200 Subject: [PATCH] Use the existing event type if there is one and one is not defined. --- src/program/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/program/forms.py b/src/program/forms.py index 9f03ebdb..cfa34c39 100644 --- a/src/program/forms.py +++ b/src/program/forms.py @@ -187,6 +187,8 @@ class EventProposalForm(forms.ModelForm): eventproposal.event_type = event_type 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']: url = self.cleaned_data.get('slides_url')