From a3c87a1945e855901448d94d30b4046955a767c4 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 6 Jul 2023 17:43:40 -0500 Subject: [PATCH] fix: repaired rfc_feed --- ietf/doc/feeds.py | 6 +++--- ietf/doc/tests.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ietf/doc/feeds.py b/ietf/doc/feeds.py index c5bb467e9..4f49aec66 100644 --- a/ietf/doc/feeds.py +++ b/ietf/doc/feeds.py @@ -224,8 +224,8 @@ class RfcFeed(Feed): extra.update({"dcterms_accessRights": "gratis"}) extra.update({"dcterms_format": "text/html"}) media_contents = [] - if int(item.rfc_number()) < 8650: - if int(item.rfc_number()) not in [8, 9, 51, 418, 500, 530, 589]: + if item.rfc_number < 8650: + if item.rfc_number not in [8, 9, 51, 418, 500, 530, 589]: for fmt, media_type in [("txt", "text/plain"), ("html", "text/html")]: media_contents.append( { @@ -234,7 +234,7 @@ class RfcFeed(Feed): "is_format_of": self.item_link(item), } ) - if int(item.rfc_number()) not in [571, 587]: + if item.rfc_number not in [571, 587]: media_contents.append( { "url": f"https://www.rfc-editor.org/rfc/pdfrfc/{item.canonical_name()}.txt.pdf", diff --git a/ietf/doc/tests.py b/ietf/doc/tests.py index 19a9462f9..c6fa0648c 100644 --- a/ietf/doc/tests.py +++ b/ietf/doc/tests.py @@ -1907,7 +1907,7 @@ class DocTestCase(TestCase): self.assertContains(r, doc.name) def test_rfc_feed(self): - rfc = WgRfcFactory(alias2__name="rfc9000") + rfc = WgRfcFactory(rfc_number=9000) DocEventFactory(doc=rfc, type="published_rfc") r = self.client.get("/feed/rfc/") self.assertTrue(r.status_code, 200)