diff --git a/app/eve_api/tasks/account.py b/app/eve_api/tasks/account.py index dfee8dd..88a3437 100644 --- a/app/eve_api/tasks/account.py +++ b/app/eve_api/tasks/account.py @@ -133,6 +133,10 @@ def import_apikey_func(api_userid, api_key, user=None, force_cache=False, log=lo if not account: return + if not account.api_key == api_key: + # Attempted change of key failed, ignore + return + error = doc['error']['code'] if int(error) >= 500: # API disabled, down or rejecting, return without changes @@ -187,6 +191,10 @@ def import_apikey_func(api_userid, api_key, user=None, force_cache=False, log=lo if not account: return + if not account.api_key == api_key: + # Attempted change of key failed, ignore + return + error = doc['error']['code'] if int(error) >= 500: # API disabled, down or rejecting, return without changes