Fix instance
This commit is contained in:
parent
d41c0ccdce
commit
68de8f8835
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ class Command(BaseCommand):
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
prs = PeopleResource.objects.all()
|
prs = PeopleResource.objects.all()
|
||||||
roles = Role.objects.all()
|
roles = Role.objects.all()
|
||||||
role_map = {r.role: r.id for r in roles}
|
role_map = {r.role: r for r in roles}
|
||||||
for pr in prs:
|
for pr in prs:
|
||||||
pr.p_r_role = role_map.get(pr.role, role_map.get(''))
|
pr.p_r_role = role_map.get(pr.role, role_map.get(''))
|
||||||
pr.save()
|
pr.save()
|
||||||
|
|
Loading…
Reference in a new issue