mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Try and ignore people updating with invalid keys
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user