make sure url is null not ''

master
Aevann 2023-08-05 22:51:01 +03:00
parent 68a1684035
commit cf7b034cf2
1 changed files with 2 additions and 0 deletions

View File

@ -499,6 +499,8 @@ def badge_grant_post(v):
if '\\' in url: abort(400) if '\\' in url: abort(400)
if url.startswith(f'{SITE_FULL}/'): if url.startswith(f'{SITE_FULL}/'):
url = url.split(SITE_FULL, 1)[1] url = url.split(SITE_FULL, 1)[1]
else:
url = None
existing = user.has_badge(badge_id) existing = user.has_badge(badge_id)
if existing: if existing: