fix 500 errors

master
Aevann1 2022-08-13 10:35:44 +02:00
parent 2d9b42237e
commit 484cac64f0
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ from math import floor
def normalize_urls_runtime(body, v):
if v.reddit != 'old.reddit.com':
if v and v.reddit != 'old.reddit.com':
body = reddit_to_vreddit_regex.sub(rf'\1https://{v.reddit}/\2/', body)
if v.nitter: body = twitter_to_nitter_regex.sub(r'https://nitter.42l.fr/\1', body)