diff --git a/app/management/commands/fix_people_resource_role.py b/app/management/commands/fix_people_resource_role.py index 9da5d5a..925a8c7 100644 --- a/app/management/commands/fix_people_resource_role.py +++ b/app/management/commands/fix_people_resource_role.py @@ -8,7 +8,7 @@ class Command(BaseCommand): def handle(self, *args, **options): prs = PeopleResource.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: pr.p_r_role = role_map.get(pr.role, role_map.get('')) pr.save()