replace deprecated json.htmlsafe_dumps

This commit is contained in:
Sébastien Bourdeauducq 2024-01-08 16:47:42 +08:00
parent 49ef25b5c3
commit 11d2e7c3d0
1 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ from flask import request
from flask_mail import Mail
from flask_mail import Message
from werkzeug.middleware.proxy_fix import ProxyFix
from jinja2.utils import htmlsafe_json_dumps
load_dotenv()
@ -41,7 +42,7 @@ def after(response):
@app.route("/rfq", methods=["POST"])
def send_rfq():
payload = request.json
payload = json.loads(json.htmlsafe_dumps(payload))
payload = json.loads(htmlsafe_json_dumps(payload))
if payload is None:
resp = jsonify(error="invalid data")