From e8caeb1b2c66df39659bcf8b2edd3ef5ae8c9a50 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 29 Jul 2021 09:54:36 +0200 Subject: [PATCH] fggf --- drama/routes/comments.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drama/routes/comments.py b/drama/routes/comments.py index 7e2169791..48faa95cc 100644 --- a/drama/routes/comments.py +++ b/drama/routes/comments.py @@ -742,8 +742,7 @@ def edit_comment(cid, v): if request.files.get("file"): file=request.files["file"] - if not file.content_type.startswith('image/'): - return jsonify({"error": "That wasn't an image!"}), 400 + if not file.content_type.startswith('image/'): return jsonify({"error": "That wasn't an image!"}), 400 name = f'comment/{c.base36id}/{secrets.token_urlsafe(8)}' url = upload_file(name, file)