Skip to content

Commit

Permalink
Merge branch 'document_service'
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Nov 1, 2016
2 parents 3e0a3b3 + 875cf7e commit ca50510
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/openprocurement/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,14 @@ def upload_file(request, blacklisted_fields=DOCUMENT_BLACKLISTED_FIELDS):
)
json_data = r.json()
except:
pass
in_file.seek(0)
else:
if r.status_code == 200 and json_data.get('data', {}).get('url'):
doc_url = json_data['data']['url']
doc_hash = json_data['data']['hash']
break
else:
in_file.seek(0)
index -= 1
else:
request.errors.add('body', 'data', "Can't upload document to document service.")
Expand Down

0 comments on commit ca50510

Please sign in to comment.