mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-18 04:08:48 -05:00
fix(client_portal): tolerate non-JSON dashboard preferences body
Use request.get_json(silent=True) so a request with the wrong Content-Type or a malformed body falls through to the existing validation path and returns 400 instead of raising a 415/parse error.
This commit is contained in:
@@ -529,7 +529,7 @@ def dashboard_preferences_post():
|
||||
except (TypeError, ValueError):
|
||||
uid = None
|
||||
|
||||
data = request.get_json() or {}
|
||||
data = request.get_json(silent=True) or {}
|
||||
widget_ids = data.get("widget_ids")
|
||||
widget_order = data.get("widget_order")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user