notify: ensure that body always ends as a string, when handling json
This commit is contained in:
parent
8833aa1ef7
commit
bf64ab19e1
1 changed files with 3 additions and 0 deletions
|
@ -265,6 +265,9 @@ def send_notification():
|
||||||
except Exception:
|
except Exception:
|
||||||
return ("Unable to compile JQ, please ensure it is correct", 400)
|
return ("Unable to compile JQ, please ensure it is correct", 400)
|
||||||
|
|
||||||
|
if not isinstance(body, str):
|
||||||
|
body = json.dumps(body, indent=4)
|
||||||
|
|
||||||
con = get_db()
|
con = get_db()
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
res = cur.execute(
|
res = cur.execute(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue