From 484cac64f0c503a36e23fe5ace608ab42fbe6572 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 13 Aug 2022 10:35:44 +0200 Subject: [PATCH] fix 500 errors --- files/classes/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index beb65faff..6c4f056b7 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -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)