Skip to content

Commit 59aedbe

Browse files
committed
The RFC Queue import has been broken by the introduction of '*R' suffices on some states. Ignore those for now; find out the semantics of this from the RFC editor and fix accordingly.
- Legacy-Id: 4152
1 parent fb71294 commit 59aedbe

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

ietf/idrfc/mirror_rfc_editor_queue.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def insert_into_databaseREDESIGN(drafts, refs):
231231
from ietf.name.models import DocTagName
232232

233233
tags = get_rfc_tag_mapping()
234-
states = get_rfc_state_mapping()
234+
state_map = get_rfc_state_mapping()
235235

236236
rfc_editor_tags = tags.values()
237237

@@ -242,20 +242,25 @@ def insert_into_databaseREDESIGN(drafts, refs):
242242

243243
log("inserting new data...")
244244

245-
for name, date_received, state, stream_id in drafts:
245+
for name, date_received, state_info, stream_id in drafts:
246246
try:
247247
d = Document.objects.get(name=name)
248248
except Document.DoesNotExist:
249249
log("unknown document %s" % name)
250250
continue
251251

252-
s = state.split(" ")
253-
if s:
252+
state_list = state_info.split(" ")
253+
if state_list:
254+
state = state_list[0]
255+
# For now, ignore the '*R...' that's appeared for some states.
256+
# FIXME : see if we need to add some refinement for this.
257+
if '*' in state:
258+
state = state.split("*")[0]
254259
# first is state
255-
d.set_state(states[s[0]])
260+
d.set_state(state_map[state])
256261

257262
# remainding are tags
258-
for x in s[1:]:
263+
for x in state_list[1:]:
259264
d.tags.add(tags[x])
260265

261266
if settings.USE_DB_REDESIGN_PROXY_CLASSES:

0 commit comments

Comments
 (0)