Commit 570187b9 by Petros Moisiadis

Updated NestedBoundField to also handle empty string when rendering its form

If a NestedBoundField field has a value of `None` and is inside another NestedBoundField field, it will have its value converted to an empty string while the form of its enclosing field is being rendered. So, NestedBoundField fields with an empty string value must be handled the same way as NestedBoundField fields with a `None` value.
parent 200dda91
...@@ -90,7 +90,7 @@ class NestedBoundField(BoundField): ...@@ -90,7 +90,7 @@ class NestedBoundField(BoundField):
""" """
def __init__(self, field, value, errors, prefix=''): def __init__(self, field, value, errors, prefix=''):
if value is None: if value is None or value is '':
value = {} value = {}
super(NestedBoundField, self).__init__(field, value, errors, prefix) super(NestedBoundField, self).__init__(field, value, errors, prefix)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment