mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Fix processing of ManyToManyField when it is empty
Signed-off-by: Fernando Rocha <fernandogrd@gmail.com>
This commit is contained in:
parent
1929159db1
commit
fceacd830f
|
@ -148,7 +148,7 @@ class ManyRelatedMixin(object):
|
|||
value = data.getlist(self.source or field_name)
|
||||
except:
|
||||
# Non-form data
|
||||
value = data.get(self.source or field_name)
|
||||
value = data.get(self.source or field_name, [])
|
||||
else:
|
||||
if value == ['']:
|
||||
value = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user