Avoid hitting the API for NPC characters

This commit is contained in:
2012-08-08 18:30:55 +01:00
parent 0bfc8eacfc
commit 3ea78a5b31
2 changed files with 9 additions and 0 deletions

View File

@@ -117,6 +117,11 @@ def link_ceo(corporation, character):
char = EVEPlayerCharacter.objects.get(id=character)
corp.update(ceo_character=char)
# Fix the reverse link if needed
if char.corporation is None:
char.corporation = corp
char.save()
@task(ignore_result=True)
def import_corp_members(key_id, character_id):