mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-15 07:12:16 +00:00
Now auto flags directors
This commit is contained in:
@@ -170,6 +170,17 @@ def import_eve_character(api_key, user_id, character_id):
|
|||||||
pchar.attrib_willpower = values['attributes']['willpower']
|
pchar.attrib_willpower = values['attributes']['willpower']
|
||||||
pchar.attrib_memory = values['attributes']['memory']
|
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':
|
if values['gender'] == 'Male':
|
||||||
pchar.gender = 1
|
pchar.gender = 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user