Fix the roles import to use id not roleid

This commit is contained in:
2010-11-04 12:50:40 +00:00
parent a35dbf454e
commit b9902d124b

View File

@@ -176,7 +176,7 @@ def import_eve_character(api_key, user_id, character_id):
roles = values.get('corporationRoles', None) roles = values.get('corporationRoles', None)
if roles and len(roles): if roles and len(roles):
for r in roles: for r in roles:
role, created = EVEPlayerCharacterRole.objects.get_or_create(roleid=r['roleID'], name=r['roleName']) role, created = EVEPlayerCharacterRole.objects.get_or_create(id=r['roleID'], name=r['roleName'])
pchar.roles.add(role) pchar.roles.add(role)
if r['roleName'] == 'roleDirector': if r['roleName'] == 'roleDirector':
pchar.director = True pchar.director = True