|
19 | 19 |
|
20 | 20 | from ietf.idtracker.models import IESGLogin, AreaDirector, PersonOrOrgInfo, WGChair, WGEditor, WGSecretary, WGTechAdvisor, ChairsHistory, Role as OldRole, Acronym, IRTFChair |
21 | 21 | from ietf.liaisons.models import LiaisonManagers, SDOAuthorizedIndividual |
| 22 | +from ietf.wgchairs.models import WGDelegate |
22 | 23 | from ietf.proceedings.models import IESGHistory |
23 | 24 | from ietf.utils.history import * |
24 | 25 |
|
25 | | - |
26 | 26 | # assumptions: |
27 | 27 | # - persons have been imported |
28 | 28 | # - groups have been imported |
29 | 29 |
|
30 | 30 | # imports roles from IESGLogin, AreaDirector, WGEditor, WGChair, |
31 | 31 | # IRTFChair, WGSecretary, WGTechAdvisor, NomCom chairs from |
32 | 32 | # ChairsHistory, IESGHistory, Role, LiaisonManagers, |
33 | | -# SDOAuthorizedIndividual |
| 33 | +# SDOAuthorizedIndividual, WGDelegate |
34 | 34 |
|
35 | 35 | area_director_role = name(RoleName, "ad", "Area Director") |
36 | 36 | chair_role = name(RoleName, "chair", "Chair") |
|
41 | 41 | adm_director_role = name(RoleName, "admdir", "Administrative Director") |
42 | 42 | liaison_manager_role = name(RoleName, "liaiman", "Liaison Manager") |
43 | 43 | authorized_role = name(RoleName, "auth", "Authorized Individual") |
| 44 | +delegate_role = name(RoleName, "delegate", "Delegate") |
| 45 | + |
| 46 | +# WGDelegate |
| 47 | +for o in WGDelegate.objects.all().order_by("pk"): |
| 48 | + print "importing WGDelegate", o.pk, unicode(o.wg).encode("utf-8"), unicode(o.person).encode("utf-8") |
44 | 49 |
|
| 50 | + group = Group.objects.get(acronym=o.wg.group_acronym.acronym) |
| 51 | + email = get_or_create_email(o, create_fake=False) |
| 52 | + |
| 53 | + Role.objects.get_or_create(name=delegate_role, group=group, email=email) |
| 54 | + |
45 | 55 | # SDOAuthorizedIndividual |
46 | 56 | for o in SDOAuthorizedIndividual.objects.all().order_by("pk"): |
47 | 57 | print "importing SDOAuthorizedIndividual", o.pk, unicode(o.sdo).encode("utf-8"), unicode(o.person).encode("utf-8") |
|
0 commit comments