Fix a bug in I18nWidget and the categories unit tests

This commit is contained in:
Raphael Michel
2015-04-05 23:40:05 +02:00
parent 060a2e8b9b
commit 95c31ec3f6
2 changed files with 4 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ class I18nWidget(forms.MultiWidget):
if value is not None and isinstance(value.data, dict) and lng in value.data
else None
)
if not isinstance(value.data, dict):
if value and not isinstance(value.data, dict):
data[0] = value.data
return data