From 89ff82d2147de0876f163a0b5861732881d31bb9 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 15 Jul 2022 13:14:10 +0200 Subject: [PATCH] Fix some historic indentation mistakes --- pgweb/core/management/commands/fetch_rss_feeds.py | 2 +- pgweb/util/signals.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pgweb/core/management/commands/fetch_rss_feeds.py b/pgweb/core/management/commands/fetch_rss_feeds.py index 0ce0b147..afa6880b 100644 --- a/pgweb/core/management/commands/fetch_rss_feeds.py +++ b/pgweb/core/management/commands/fetch_rss_feeds.py @@ -49,6 +49,6 @@ class Command(BaseCommand): fetchedsomething = True if fetchedsomething: - importfeed.purge_related() + importfeed.purge_related() except Exception as e: print("Failed to load %s: %s" % (importfeed, e)) diff --git a/pgweb/util/signals.py b/pgweb/util/signals.py index 0552ea33..8b69dd88 100644 --- a/pgweb/util/signals.py +++ b/pgweb/util/signals.py @@ -84,11 +84,11 @@ def _get_notification_text(obj): _get_full_text_representation(obj)) if hasattr(obj, 'approved') or hasattr(obj, 'modstate'): - # This object has the capability to do approving. Apply the following logic: - # 1. If object was unapproved, and is still unapproved, don't send notification - # 2. If object was unapproved, and is now approved, send "object approved" notification - # 3. If object was approved, and is no longer approved, send "object unapproved" notification - # 4. (FIXME: configurable?) If object was approved and is still approved, send changes notification + # This object has the capability to do approving. Apply the following logic: + # 1. If object was unapproved, and is still unapproved, don't send notification + # 2. If object was unapproved, and is now approved, send "object approved" notification + # 3. If object was approved, and is no longer approved, send "object unapproved" notification + # 4. (FIXME: configurable?) If object was approved and is still approved, send changes notification if hasattr(obj, 'approved'): approved = obj.approved -- 2.39.5