From ab082a5f9b6fb59c2b96acdb47f7ba63b7fdcd8d Mon Sep 17 00:00:00 2001 From: Son NK Date: Wed, 11 Mar 2020 14:02:35 +0100 Subject: [PATCH] fix get_json returns 400 --- app/api/views/new_random_alias.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/views/new_random_alias.py b/app/api/views/new_random_alias.py index 4d097b0c..978d9756 100644 --- a/app/api/views/new_random_alias.py +++ b/app/api/views/new_random_alias.py @@ -33,7 +33,7 @@ def new_random_alias(): ) note = None - data = request.get_json() + data = request.get_json(silent=True) if data: note = data.get("note")