Now auto flags directors

This commit is contained in:
2010-09-10 09:35:40 +01:00
parent 4a5317bc01
commit 005b491d8c

View File

@@ -170,6 +170,17 @@ def import_eve_character(api_key, user_id, character_id):
pchar.attrib_willpower = values['attributes']['willpower']
pchar.attrib_memory = values['attributes']['memory']
# Check if the character is a director
pchar.director = False
roles = values.get('corporationRoles', None)
print roles
if roles and len(roles):
for r in roles:
print r
if r['roleName'] == 'roleDirector':
pchar.director = True
break
if values['gender'] == 'Male':
pchar.gender = 1
else: