mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-28 12:34:00 +03:00
Don't add unknown field errors if allow_unknown_form_fields is set
This commit is contained in:
parent
e53c819cc7
commit
2e74d379e4
|
@ -168,6 +168,7 @@ class FormResource(Resource):
|
||||||
if not key.startswith('__')
|
if not key.startswith('__')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not self.allow_unknown_form_fields:
|
||||||
# Add any unknown field errors
|
# Add any unknown field errors
|
||||||
for key in unknown_fields:
|
for key in unknown_fields:
|
||||||
field_errors[key] = [u'This field does not exist.']
|
field_errors[key] = [u'This field does not exist.']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user