Merge pull request #12 from hughrun/editions

check newsletter description properly
This commit is contained in:
Hugh Rundle 2024-06-17 16:22:24 +10:00 committed by GitHub
commit 929b9fb5ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 += "..."