Skip to content

Commit d604986

Browse files
committed
[REF] refactor checking of json_payload
Signed-off-by: Red <redickbutay02@gmail.com>
1 parent bc5eb7c commit d604986

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spp_api/controllers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def wrapper(self, *args, **kwargs):
7979
# silent=True prevents Werkzeug from raising a 400 error on bad JSON
8080
json_payload = request.httprequest.get_json(silent=True)
8181

82-
if json_payload:
82+
if json_payload is not None:
8383
request_data = json.dumps(json_payload)
8484
else:
8585
# Fallback to raw data if not JSON

0 commit comments

Comments
 (0)