From cf2ff07bd3d3825a901bec5ef7e23a4b38d440d2 Mon Sep 17 00:00:00 2001 From: jwansek Date: Tue, 31 Mar 2020 10:56:57 +0000 Subject: fixed bug with updating flair, updated db and log --- subreddit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subreddit.py') diff --git a/subreddit.py b/subreddit.py index fc13cb1..3743a8d 100755 --- a/subreddit.py +++ b/subreddit.py @@ -46,10 +46,10 @@ def update_users_flair_from_comment(comment): def update_users_flair(username): flairtext = next(SUBREDDIT.flair(redditor=username))["flair_text"] - flairscore = get_lambda_from_flair(flairtext) if flairtext is None: flairtext = "" else: + flairscore = get_lambda_from_flair(flairtext) flairtext = str(flairtext.replace("[%s] " % flairscore, "")) if username in get_mods(): newflair = "[∞λ] %s" % (flairtext) @@ -280,7 +280,7 @@ Views|%s except: pass - update_users_flair_from_comment(submission) + update_users_flair(str(submission.author)) return text def main(): -- cgit v1.2.3