Skip to content

Commit

Permalink
feat: Set published state on rfc doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-richards committed Aug 10, 2023
1 parent 7535df3 commit 39ccea9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ietf/sync/rfceditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def update_docs_from_rfc_index(
alias, _ = DocAlias.objects.get_or_create(name=doc.name)
alias.docs.add(doc)
rfc_changes.append(f"created alias {prettify_std_name(doc.name)}")
doc.set_state(rfc_published_state)
if draft:
doc.formal_languages.set(draft.formal_languages.all())

Expand Down Expand Up @@ -530,9 +531,12 @@ def update_docs_from_rfc_index(
doc.stream = stream_mapping[stream]
rfc_changes.append(f"changed stream to {doc.stream}")

if (
not doc.group
): # if we have no group assigned, check if RFC Editor has a suggestion
if doc.get_state(rfc_published_state.type) != rfc_published_state:
doc.set_state(rfc_published_state)
rfc_changes.append(f"changed {rfc_published_state.type.label} to {rfc_published_state}")

# if we have no group assigned, check if RFC Editor has a suggestion
if not doc.group:
if wg:
doc.group = Group.objects.get(acronym=wg)
rfc_changes.append(f"set group to {doc.group}")
Expand Down

0 comments on commit 39ccea9

Please sign in to comment.