Skip to content

Commit

Permalink
Merge branch 'a222684882524832_put_json'
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Dec 22, 2016
2 parents a5179fb + 0a7a732 commit 121247a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openprocurement/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def upload_file(request, blacklisted_fields=DOCUMENT_BLACKLISTED_FIELDS, whiteli
for attr_name in type(first_document)._fields:
if attr_name in whitelisted_fields:
setattr(document, attr_name, getattr(first_document, attr_name))
elif attr_name not in blacklisted_fields and getattr(document, attr_name) == type(first_document)._fields[attr_name].default:
elif attr_name not in blacklisted_fields and not request.validated['data'].get(attr_name):
setattr(document, attr_name, getattr(first_document, attr_name))
return document
if request.content_type == 'multipart/form-data':
Expand Down

0 comments on commit 121247a

Please sign in to comment.