diff --git a/rest_framework/utils/serializer_helpers.py b/rest_framework/utils/serializer_helpers.py index 415e291c9..b2e0fc80e 100644 --- a/rest_framework/utils/serializer_helpers.py +++ b/rest_framework/utils/serializer_helpers.py @@ -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)):