fix faulty description appending code
This commit is contained in:
parent
88d56e5e04
commit
fd773817eb
|
@ -142,15 +142,15 @@ class Command(BaseCommand):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if description:
|
if description:
|
||||||
description[:200] += "..."
|
desc = description[:200] + "..."
|
||||||
else:
|
else:
|
||||||
description = ""
|
desc = ""
|
||||||
|
|
||||||
instance = models.Article.objects.create(
|
instance = models.Article.objects.create(
|
||||||
title=article.title,
|
title=article.title,
|
||||||
author_name=author_name,
|
author_name=author_name,
|
||||||
url=article.link,
|
url=article.link,
|
||||||
description=description,
|
description=desc,
|
||||||
updateddate=date_to_tz_aware(
|
updateddate=date_to_tz_aware(
|
||||||
article.updated_parsed
|
article.updated_parsed
|
||||||
),
|
),
|
||||||
|
@ -224,15 +224,15 @@ class Command(BaseCommand):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if description:
|
if description:
|
||||||
description[:200] += "..."
|
desc = description[:200] + "..."
|
||||||
else:
|
else:
|
||||||
description = ""
|
desc = ""
|
||||||
|
|
||||||
instance = models.Edition.objects.create(
|
instance = models.Edition.objects.create(
|
||||||
title=edition.title,
|
title=edition.title,
|
||||||
author_name=author_name,
|
author_name=author_name,
|
||||||
url=edition.link,
|
url=edition.link,
|
||||||
description=description,
|
description=desc,
|
||||||
updateddate=date_to_tz_aware(edition.updated_parsed),
|
updateddate=date_to_tz_aware(edition.updated_parsed),
|
||||||
newsletter=newsletter,
|
newsletter=newsletter,
|
||||||
pubdate=date_to_tz_aware(edition.published_parsed),
|
pubdate=date_to_tz_aware(edition.published_parsed),
|
||||||
|
|
Loading…
Reference in a new issue