Fix characters getting assigned vcode as api id

This commit is contained in:
Adarnof 2016-03-11 01:21:46 -05:00
parent 170221169c
commit 724b8d0c00

View File

@ -529,7 +529,7 @@ def refresh_api(api_key_pair):
logger.debug("API key %s has a new character on the account: %s" % (api_key_pair.api_id, characters.result[char]['name'])) logger.debug("API key %s has a new character on the account: %s" % (api_key_pair.api_id, characters.result[char]['name']))
if new_character: if new_character:
logger.debug("Creating new character %s from api key %s" % (characters.result[char]['name'], api_key_pair.api_id)) logger.debug("Creating new character %s from api key %s" % (characters.result[char]['name'], api_key_pair.api_id))
EveManager.create_characters_from_list(characters, user, api_key_pair.api_key) EveManager.create_characters_from_list(characters, user, api_key_pair.api_id)
else: else:
logger.debug("API key %s is no longer valid; it and its characters will be deleted." % api_key_pair.api_id) logger.debug("API key %s is no longer valid; it and its characters will be deleted." % api_key_pair.api_id)
EveManager.delete_characters_by_api_id(api_key_pair.api_id, user.id) EveManager.delete_characters_by_api_id(api_key_pair.api_id, user.id)