notify: ensure that body always ends as a string, when handling json

This commit is contained in:
eyjhb 2025-03-10 20:03:41 +01:00
parent 8833aa1ef7
commit bf64ab19e1
Signed by: eyjhb
GPG key ID: 609F508E3239F920

View file

@ -265,6 +265,9 @@ def send_notification():
except Exception:
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()
cur = con.cursor()
res = cur.execute(