mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-13 13:16:55 +03:00
Don't return unknown field errors if allow_unknown_form_fields is True
This commit is contained in:
parent
537fa19bac
commit
e3d7c36105
|
@ -169,8 +169,9 @@ class FormResource(Resource):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add any unknown field errors
|
# Add any unknown field errors
|
||||||
for key in unknown_fields:
|
if not self.allow_unknown_form_fields:
|
||||||
field_errors[key] = [u'This field does not exist.']
|
for key in unknown_fields:
|
||||||
|
field_errors[key] = [u'This field does not exist.']
|
||||||
|
|
||||||
if field_errors:
|
if field_errors:
|
||||||
detail[u'field_errors'] = field_errors
|
detail[u'field_errors'] = field_errors
|
||||||
|
|
Loading…
Reference in New Issue
Block a user