From 496edb75b01458dae17c33a3c3cfd3c615075098 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Mon, 17 Jun 2024 15:58:32 +1000 Subject: [PATCH] check newsletter description properly also sends a blank string instead of None if nothing else matches fixes #11 --- blogs/management/commands/check_feeds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blogs/management/commands/check_feeds.py b/blogs/management/commands/check_feeds.py index e0c2426..8283594 100644 --- a/blogs/management/commands/check_feeds.py +++ b/blogs/management/commands/check_feeds.py @@ -135,7 +135,7 @@ class Command(BaseCommand): hasattr(article, "content") and len(article.content) ) - else None + else "" ) if description: description += "..." @@ -202,14 +202,14 @@ class Command(BaseCommand): else html.strip_tags(edition.description) if ( hasattr(edition, "description") - and len(edition.summary) + and len(edition.description) ) else html.strip_tags(edition.content[0].value)[:200] + "..." if ( hasattr(article, "content") and len(article.content) ) - else None + else "" ) if description: description += "..." -- 2.39.5