Commit f4ad77ac by Tom Christie

Fix for empty form fields

parent 58c12632
......@@ -250,7 +250,7 @@ class ManyPrimaryKeyRelatedField(PrimaryKeyRelatedField):
value = data.getlist(field_name)
except:
value = data.get(field_name)
into[field_name] = [self.from_native(item) for item in value]
into[field_name] = [self.from_native(item) for item in value if item]
class NaturalKeyRelatedField(RelatedField):
......
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