From ab6f26c046c16405db397438dc4ed691b5a54db6 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Mon, 17 Jun 2024 16:28:44 +1000 Subject: [PATCH 1/2] Update requirements.txt requests 2.32.0 was yanked. --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 38747b9..7da8b1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,9 +4,9 @@ Django==4.2.11 environs==9.5.0 feedparser==6.0.10 psycopg2==2.9.5 -requests==2.32.0 +requests==2.32.3 # dev black==24.3.0 -pylint==3.0.3 \ No newline at end of file +pylint==3.0.3 -- 2.39.5 From fd773817ebe3f108e4d5302ce0d704025f489ed0 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Fri, 28 Jun 2024 18:28:26 +1000 Subject: [PATCH 2/2] fix faulty description appending code --- blogs/management/commands/check_feeds.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/blogs/management/commands/check_feeds.py b/blogs/management/commands/check_feeds.py index fad09c8..a986823 100644 --- a/blogs/management/commands/check_feeds.py +++ b/blogs/management/commands/check_feeds.py @@ -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), -- 2.39.5