From 39ccea92f9c6e243ce560f1b9c3f0d1dc965f7cb Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Thu, 10 Aug 2023 17:01:06 -0300 Subject: [PATCH] feat: Set published state on rfc doc --- ietf/sync/rfceditor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ietf/sync/rfceditor.py b/ietf/sync/rfceditor.py index 7f668c4962..8b0fc5f5e9 100644 --- a/ietf/sync/rfceditor.py +++ b/ietf/sync/rfceditor.py @@ -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()) @@ -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}")