Don't presave invalid account details

This commit is contained in:
2011-08-11 22:23:00 +01:00
parent 18a219f4b5
commit a14ac273c1
2 changed files with 1 additions and 6 deletions

View File

@@ -103,7 +103,7 @@ def import_apikey_func(api_userid, api_key, user=None, force_cache=False, log=lo
# Create or retrieve the account last to make sure everything
# before here is good to go.
account, created = EVEAccount.objects.get_or_create(api_user_id=api_userid)
if not created and not account.api_key == api_key:
if not account.api_key == api_key:
account.api_key = api_key
account.api_keytype = API_KEYTYPE_UNKNOWN
account.api_status = API_STATUS_OK