Skip to content

Commit

Permalink
Fix webgui KeyError (#505)
Browse files Browse the repository at this point in the history
Co-authored-by: Janosh Riebesell <[email protected]>
  • Loading branch information
jmmshn and janosh authored Aug 13, 2023
1 parent d3d2ff0 commit 1ec60f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fireworks/flask_site/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def jsonify(*args, **kwargs):
"""
indent = None
separators = (",", ":")

if current_app.config["JSONIFY_PRETTYPRINT_REGULAR"] or current_app.debug:
if current_app.config.get("JSONIFY_PRETTYPRINT_REGULAR") or current_app.debug:
indent = 2
separators = (", ", ": ")

Expand All @@ -34,5 +33,5 @@ def jsonify(*args, **kwargs):

return current_app.response_class(
dumps(data, indent=indent, separators=separators, cls=MongoJsonEncoder) + "\n",
mimetype=current_app.config["JSONIFY_MIMETYPE"],
mimetype=current_app.config.get("JSONIFY_MIMETYPE"),
)

0 comments on commit 1ec60f8

Please sign in to comment.