mirror of
https://github.com/nikdoof/test-auth.git
synced 2026-01-30 16:08:14 +00:00
Eve_api module now pulls Corp if we don't have a record of it, and aborts on a error
This commit is contained in:
@@ -59,6 +59,11 @@ def import_eve_account(api_key, user_id):
|
|||||||
# Get this first, as it's safe.
|
# Get this first, as it's safe.
|
||||||
corporation_id = node.getAttribute('corporationID')
|
corporation_id = node.getAttribute('corporationID')
|
||||||
corp, created = EVEPlayerCorporation.objects.get_or_create(id=corporation_id)
|
corp, created = EVEPlayerCorporation.objects.get_or_create(id=corporation_id)
|
||||||
|
if not corp.name:
|
||||||
|
try:
|
||||||
|
corp.query_and_update_corp()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
# Do this last, since the things we retrieved above are used
|
# Do this last, since the things we retrieved above are used
|
||||||
# on the EVEPlayerCharacter object's fields.
|
# on the EVEPlayerCharacter object's fields.
|
||||||
character_id = node.getAttribute('characterID')
|
character_id = node.getAttribute('characterID')
|
||||||
|
|||||||
Reference in New Issue
Block a user