@@ -54,15 +54,22 @@ def name(name_class, slug, name, desc=""):
5454iesg_group .type = type_names ["ietf" ]
5555iesg_group .save ()
5656
57+ # make sure we got the IRTF as parent for RGs
58+ irtf_group , _ = Group .objects .get_or_create (acronym = "irtf" )
59+ irtf_group .name = "IRTF"
60+ irtf_group .state = state_names ["active" ]
61+ irtf_group .type = type_names ["ietf" ]
62+ irtf_group .save ()
63+
5764system_email , _ = Email .objects .get_or_create (address = "(System)" )
5865
5966
6067# NomCom
61- Group .objects .filter (acronym = "nominatingcom " ).delete ()
68+ Group .objects .filter (acronym__startswith = "nomcom" ). exclude ( acronym = "nomcom " ).delete ()
6269
6370for o in ChairsHistory .objects .filter (chair_type = Role .NOMCOM_CHAIR ).order_by ("start_year" ):
6471 group = Group ()
65- group .acronym = "nominatingcom"
72+ group .acronym = "nomcom%s" % o . start_year
6673 group .name = "IAB/IESG Nominating Committee %s/%s" % (o .start_year , o .end_year )
6774 if o .chair_type .person == o .person :
6875 s = state_names ["active" ]
@@ -126,24 +133,21 @@ def name(name_class, slug, name, desc=""):
126133 group .name = o .name
127134 group .state = state_names ["active" ] # we assume all to be active
128135 group .type = type_names ["rg" ]
129-
130- # FIXME: who is the parent?
131- # group.parent = Group.objects.get(acronym=)
132- print "no parent for" , group .acronym , group .name , group .type , group .state
136+ group .parent = irtf_group
133137
134138 group .comments = o .charter_text or ""
135139
136140 group .save ()
137141
138142 # FIXME: missing fields from old: meeting_scheduled
139143
140-
141144# IETFWG, AreaGroup
142145for o in IETFWG .objects .all ():
143146 try :
144147 group = Group .objects .get (acronym = o .group_acronym .acronym )
145148 except Group .DoesNotExist :
146149 group = Group (acronym = o .group_acronym .acronym )
150+ group .id = o .group_acronym_id # transfer id
147151
148152 group .name = o .group_acronym .name
149153 # state
0 commit comments