File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ def update_docs_from_rfc_index(data, skip_older_than_date=None):
327327
328328 if not doc :
329329 results .append ("created document %s" % name )
330- doc = Document .objects .get_or_create (name = name )[ 0 ]
330+ doc = Document .objects .create (name = name , type = DocTypeName . objects . get ( slug = "draft" ))
331331
332332 # add alias
333333 DocAlias .objects .get_or_create (name = name , document = doc )
@@ -358,8 +358,11 @@ def update_docs_from_rfc_index(data, skip_older_than_date=None):
358358 if doc .stream != stream_mapping [stream ]:
359359 changed_attributes ["stream" ] = stream_mapping [stream ]
360360
361- if not doc .group and wg :
362- changed_attributes ["group" ] = Group .objects .get (acronym = wg )
361+ if not doc .group : # if we have no group assigned, check if RFC Editor has a suggestion
362+ if wg :
363+ changed_attributes ["group" ] = Group .objects .get (acronym = wg )
364+ else :
365+ changed_attributes ["group" ] = Group .objects .get (type = "individ" )
363366
364367 if not doc .latest_event (type = "published_rfc" ):
365368 e = DocEvent (doc = doc , type = "published_rfc" )
You can’t perform that action at this time.
0 commit comments