Skip to content

Commit

Permalink
prevent account route throwing unsupported media type
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-jones committed Dec 23, 2024
1 parent e0ee707 commit bf7de47
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion portality/view/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ def username(username):
if not form.validate():
return render_template(template, account=acc, form=form)

newdata = request.json if request.json else request.values
newdata = request.values
try:
newdata = request.json
except:
pass

# newdata = request.json if request.json else request.values
if request.values.get('submit', False) == 'Generate a new API Key':
acc.generate_api_key()

Expand Down

0 comments on commit bf7de47

Please sign in to comment.