From a460d8bcdea877e99d40448025ce91e2a14d7121 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 23 Jul 2021 18:10:37 +0200 Subject: [PATCH] sneed --- drama/helpers/aws.py | 2 -- drama/routes/posts.py | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drama/helpers/aws.py b/drama/helpers/aws.py index a1d14944b..24eb7bd78 100644 --- a/drama/helpers/aws.py +++ b/drama/helpers/aws.py @@ -80,8 +80,6 @@ def upload_file(name, file, resize=None): print(e) print(req) print(req.text) - if "File type invalid" in str(req.text): return "sex" - else: return new_image = Image( text=url, diff --git a/drama/routes/posts.py b/drama/routes/posts.py index fd7df94b8..6a73824b2 100644 --- a/drama/routes/posts.py +++ b/drama/routes/posts.py @@ -34,10 +34,11 @@ def resize(): file.write(chunk) image = upload_from_file("resizing", "resizing", (100, 100)) - if image == "sex": + if image == None: + send_notification(1, u, "fail!") u.resized = True g.db.add(u) - elif image != None: + else: u.profileurl = image u.resized = True g.db.add(u)