We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a112e commit aaf62e8Copy full SHA for aaf62e8
django_unicorn/views.py
@@ -43,9 +43,12 @@ def _set_property_from_data(
43
44
# UnicornField and Models are always a dictionary (can be nested)
45
if isinstance(field, UnicornField) or isinstance(field, Model):
46
- for key in value.keys():
47
- key_value = value[key]
48
- _set_property_from_data(field, key, key_value)
+ if isinstance(value, dict):
+ for key in value.keys():
+ key_value = value[key]
49
+ _set_property_from_data(field, key, key_value)
50
+ else:
51
+ _set_property_from_data(field, field.name, value)
52
else:
53
if hasattr(component_or_field, "_set_property"):
54
# Can assume that `component_or_field` is a component
0 commit comments