Merge "Fix for werkzeug > 0.15" into stable/stein

This commit is contained in:
Zuul 2022-01-15 15:00:16 +00:00 committed by Gerrit Code Review
commit 1d9baa62ac
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ def json_body_before_request():
# Explicitly check if the content is supposed to be json.
if (flask.request.is_json
or flask.request.headers['Content-Type'] == ''):
or flask.request.headers.get('Content-Type', '') == ''):
json_decoded = flask.request.get_json(force=True)
if not isinstance(json_decoded, dict):
# In the case that the returned value was not a dict, force