Merge pull request #15 from hughrun/fix-summaries

fix faulty description appending code
This commit is contained in:
Hugh Rundle 2024-06-28 18:29:12 +10:00 committed by GitHub
commit d70c1f0182
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,15 +142,15 @@ class Command(BaseCommand):
)
)
if description:
description[:200] += "..."
desc = description[:200] + "..."
else:
description = ""
desc = ""
instance = models.Article.objects.create(
title=article.title,
author_name=author_name,
url=article.link,
description=description,
description=desc,
updateddate=date_to_tz_aware(
article.updated_parsed
),
@ -224,15 +224,15 @@ class Command(BaseCommand):
)
)
if description:
description[:200] += "..."
desc = description[:200] + "..."
else:
description = ""
desc = ""
instance = models.Edition.objects.create(
title=edition.title,
author_name=author_name,
url=edition.link,
description=description,
description=desc,
updateddate=date_to_tz_aware(edition.updated_parsed),
newsletter=newsletter,
pubdate=date_to_tz_aware(edition.published_parsed),