Skip to content

Commit

Permalink
fix: repaired rfc_feed
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks committed Jul 6, 2023
1 parent 3486f38 commit a3c87a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ietf/doc/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def item_extra_kwargs(self, item):
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(
{
Expand All @@ -234,7 +234,7 @@ def item_extra_kwargs(self, item):
"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",
Expand Down
2 changes: 1 addition & 1 deletion ietf/doc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,7 @@ def test_last_call_feed(self):
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)
Expand Down

0 comments on commit a3c87a1

Please sign in to comment.