fix: repaired rfc_feed

This commit is contained in:
Robert Sparks 2023-07-06 17:43:40 -05:00
parent 3486f38421
commit a3c87a1945
No known key found for this signature in database
GPG key ID: 6E2A6A5775F91318
2 changed files with 4 additions and 4 deletions

View file

@ -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",

View file

@ -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)