Fix roleIDs to use a charfield until we get bigints in django 1.2

This commit is contained in:
2010-09-11 19:38:52 +01:00
parent 94dc88b86d
commit 2b9b9358b1
3 changed files with 136 additions and 1 deletions

View File

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