Permalink
Browse files

Add default conversion to dumps

Added default converter to dumps to avoid serialization error for
datetime.datetime
  • Loading branch information...
datadavev committed Apr 11, 2017
1 parent c25a236 commit e5fabae06e298c5002b75431948e20416b0d4247
Showing with 1 addition and 1 deletion.
  1. +1 −1 recipyGui/views.py
View
@@ -119,7 +119,7 @@ def runs2json():
runs = [db.get(eid=run_id) for run_id in run_ids]
db.close()
response = make_response(dumps(runs, indent=2, sort_keys=True))
response = make_response(dumps(runs, indent=2, sort_keys=True, default=unicode))
response.headers['content-type'] = 'application/json'
response.headers['Content-Disposition'] = 'attachment; filename=runs.json'
return response

0 comments on commit e5fabae

Please sign in to comment.