From 1a6df0086c4a4d761dccd392d0e150eb46bae212 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 14 Sep 2023 23:19:06 +0300 Subject: [PATCH] fix for old versions of reddit api --- files/helpers/offsitementions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/offsitementions.py b/files/helpers/offsitementions.py index 18f91f014..f3f696139 100644 --- a/files/helpers/offsitementions.py +++ b/files/helpers/offsitementions.py @@ -42,7 +42,7 @@ def get_mentions(cache, queries, reddit_notifs_users=False): if not thing.get('permalink'): continue - if thing['subreddit_subscribers'] < 2: continue + if thing.get('subreddit_subscribers') and thing['subreddit_subscribers'] < 2: continue if thing['subreddit'] in {'IAmA', 'PokemonGoRaids', 'SubSimulatorGPT2', 'SubSimGPT2Interactive'}: continue if 'bot' in thing['author'].lower(): continue if 'AutoModerator' == thing['author']: continue