From 6b2ab44b2674bb31bd814137e17c6e4c63932734 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 9 Feb 2021 19:00:20 +0100 Subject: [PATCH] Fix undefined variable --- src/pretix/base/forms/questions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/base/forms/questions.py b/src/pretix/base/forms/questions.py index 7a732e21b..6b86a46cd 100644 --- a/src/pretix/base/forms/questions.py +++ b/src/pretix/base/forms/questions.py @@ -444,6 +444,7 @@ class BaseQuestionsForm(forms.Form): c = [('', pgettext_lazy('address', 'Select state'))] fprefix = str(self.prefix) + '-' if self.prefix is not None and self.prefix != '-' else '' cc = None + state = None if fprefix + 'country' in self.data: cc = str(self.data[fprefix + 'country']) elif country: @@ -455,7 +456,6 @@ class BaseQuestionsForm(forms.Form): state = (cartpos.state if cartpos else orderpos.state) elif fprefix + 'state' in self.data: self.data = self.data.copy() - state = None del self.data[fprefix + 'state'] add_fields['state'] = forms.ChoiceField(