mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Fix a bug in I18FormField
This commit is contained in:
@@ -59,9 +59,11 @@ class I18nWidget(forms.MultiWidget):
|
|||||||
for lng in self.langcodes():
|
for lng in self.langcodes():
|
||||||
data.append(
|
data.append(
|
||||||
value.data[lng]
|
value.data[lng]
|
||||||
if value is not None and value.data is not None and lng in value.data
|
if value is not None and isinstance(value.data, dict) and lng in value.data
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
|
if not isinstance(value.data, dict):
|
||||||
|
data[0] = value.data
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def format_output(self, rendered_widgets):
|
def format_output(self, rendered_widgets):
|
||||||
|
|||||||
Reference in New Issue
Block a user