Resolve issue with rendering nested serializer forms with empty values. Closes #3260.

This commit is contained in:
Tom Christie 2015-08-11 16:25:02 +01:00
parent 0df99a6c95
commit a3e64fbe0d

View File

@ -101,6 +101,9 @@ class NestedBoundField(BoundField):
return BoundField(field, value, error, prefix=self.name + '.')
def as_form_field(self):
if self.value is None:
return ''
values = {}
for key, value in self.value.items():
if isinstance(value, (list, dict)):