Skip to content

Commit

Permalink
check if field exists before trying to convert to string
Browse files Browse the repository at this point in the history
  • Loading branch information
gubser committed Jul 30, 2016
1 parent f5e04f9 commit 245f8c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ptocore/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def list_analyzers():
print(doc)
record = dict(doc)
if 'execution_result' in record:
if 'upload_ids' in record['execution_result']:
if 'upload_ids' in record['execution_result'] and record['execution_result']['upload_ids'] is not None:
record['execution_result']['upload_ids'] = [str(x) for x in record['execution_result']['upload_ids']]
records.append(record)
return flask.jsonify(records)
Expand Down

0 comments on commit 245f8c8

Please sign in to comment.