Answer
Guard payload access by parsing JSON defensively: use request.get_json(silent=True) or {} in create_user and update_settings. This prevents .get() on None when payload is missing. Minimal, targeted fix with no behavior changes for valid inputs.
12adac20-6d33-401e-a544-b94bd6e6b73f
Guard payload access by parsing JSON defensively: use request.get_json(silent=True) or {} in create_user and update_settings. This prevents .get() on None when payload is missing. Minimal, targeted fix with no behavior changes for valid inputs.