From f97cb9a06e79b27b1c58a522d0bb28bb68d10cc8 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Wed, 18 Sep 2024 15:26:24 -0500 Subject: [PATCH 1/3] fix: guid must be a full URL, use item link url --- downloads/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/downloads/views.py b/downloads/views.py index 92e851545..bf8f5cc4d 100644 --- a/downloads/views.py +++ b/downloads/views.py @@ -194,5 +194,9 @@ def item_pubdate(self, item: Release) -> datetime | None: return None def item_guid(self, item: Release) -> str: - """Return a unique ID for the item based on DB record.""" - return str(item.pk) + """Return a link as the GUID for the item. + + ``guid`` must be a full URL, unless `isPermaLink` attribute is false + https://validator.w3.org/feed/docs/error/InvalidHttpGUID.html + """ + return str(self.link()) From aaa29413058e5abe500bb984a470cdde3bb6bf3f Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Wed, 18 Sep 2024 15:35:45 -0500 Subject: [PATCH 2/3] Update downloads/views.py Co-authored-by: Ee Durbin --- downloads/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downloads/views.py b/downloads/views.py index bf8f5cc4d..3742badbe 100644 --- a/downloads/views.py +++ b/downloads/views.py @@ -199,4 +199,4 @@ def item_guid(self, item: Release) -> str: ``guid`` must be a full URL, unless `isPermaLink` attribute is false https://validator.w3.org/feed/docs/error/InvalidHttpGUID.html """ - return str(self.link()) + return str(item.get_absolute_url()) From a413e202585dca70b2533cbc169420a5eb0c3ba0 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Wed, 18 Sep 2024 15:49:17 -0500 Subject: [PATCH 3/3] chore: use default for guid --- downloads/views.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/downloads/views.py b/downloads/views.py index 3742badbe..6a7f9d95e 100644 --- a/downloads/views.py +++ b/downloads/views.py @@ -192,11 +192,3 @@ def item_pubdate(self, item: Release) -> datetime | None: return timezone.make_aware(item.release_date) return item.release_date return None - - def item_guid(self, item: Release) -> str: - """Return a link as the GUID for the item. - - ``guid`` must be a full URL, unless `isPermaLink` attribute is false - https://validator.w3.org/feed/docs/error/InvalidHttpGUID.html - """ - return str(item.get_absolute_url())