From cf7b034cf2e9f1b7621bd7dbc7116eeb27bc1b66 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 5 Aug 2023 22:51:01 +0300 Subject: [PATCH] make sure url is null not '' --- files/routes/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index 7cc0bc108..c27677296 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -499,6 +499,8 @@ def badge_grant_post(v): if '\\' in url: abort(400) if url.startswith(f'{SITE_FULL}/'): url = url.split(SITE_FULL, 1)[1] + else: + url = None existing = user.has_badge(badge_id) if existing: