From a27f37278563d083cf6e1f61c7b4b8e3d1e16033 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 5 Oct 2017 08:01:22 +0200 Subject: [PATCH] Event creation UX: Pre-choose organizer if there is only one --- src/pretix/control/forms/event.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py index bc29f1bf87..8233725251 100644 --- a/src/pretix/control/forms/event.py +++ b/src/pretix/control/forms/event.py @@ -46,6 +46,8 @@ class EventWizardFoundationForm(forms.Form): empty_label=None, required=True ) + if len(self.fields['organizer'].choices) == 1: + self.fields['organizer'].initial = self.fields['organizer'].queryset.first() class EventWizardBasicsForm(I18nModelForm):