mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Fix undefined variable
This commit is contained in:
@@ -444,6 +444,7 @@ class BaseQuestionsForm(forms.Form):
|
|||||||
c = [('', pgettext_lazy('address', 'Select state'))]
|
c = [('', pgettext_lazy('address', 'Select state'))]
|
||||||
fprefix = str(self.prefix) + '-' if self.prefix is not None and self.prefix != '-' else ''
|
fprefix = str(self.prefix) + '-' if self.prefix is not None and self.prefix != '-' else ''
|
||||||
cc = None
|
cc = None
|
||||||
|
state = None
|
||||||
if fprefix + 'country' in self.data:
|
if fprefix + 'country' in self.data:
|
||||||
cc = str(self.data[fprefix + 'country'])
|
cc = str(self.data[fprefix + 'country'])
|
||||||
elif country:
|
elif country:
|
||||||
@@ -455,7 +456,6 @@ class BaseQuestionsForm(forms.Form):
|
|||||||
state = (cartpos.state if cartpos else orderpos.state)
|
state = (cartpos.state if cartpos else orderpos.state)
|
||||||
elif fprefix + 'state' in self.data:
|
elif fprefix + 'state' in self.data:
|
||||||
self.data = self.data.copy()
|
self.data = self.data.copy()
|
||||||
state = None
|
|
||||||
del self.data[fprefix + 'state']
|
del self.data[fprefix + 'state']
|
||||||
|
|
||||||
add_fields['state'] = forms.ChoiceField(
|
add_fields['state'] = forms.ChoiceField(
|
||||||
|
|||||||
Reference in New Issue
Block a user