Skip to content

Commit

Permalink
fix: Drop leading 0s from RFC doc-id
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-richards committed Aug 11, 2023
1 parent a66457b commit aff4c2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ietf/sync/rfceditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ def update_docs_from_rfc_index(
errata: dict[str, list[dict]] = {}
for item in errata_data:
name = item["doc-id"]
if name.upper().startswith("RFC"):
name = f"RFC{int(name[3:])}" # removes leading 0s on the rfc number
if not name in errata:
errata[name] = []
errata[name].append(item)
Expand Down Expand Up @@ -633,7 +635,7 @@ def parse_relation_list(l):
DocAlias.objects.create(name=a).docs.add(doc)
rfc_changes.append(f"created alias {prettify_std_name(a)}")

doc_errata = errata.get("RFC%04d" % rfc_number, []) # rfc10k problem here
doc_errata = errata.get(f"RFC{rfc_number}", [])
all_rejected = doc_errata and all(
er["errata_status_code"] == "Rejected" for er in doc_errata
)
Expand Down

0 comments on commit aff4c2d

Please sign in to comment.