mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Fix for empty form fields
This commit is contained in:
parent
58c1263267
commit
f4ad77ac04
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user