mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-14 19:50:11 +01:00
Fix remote API key database lookup
This commit is contained in:
parent
c782fe108b
commit
fa24655404
@ -101,8 +101,11 @@ class RemoteDatabase:
|
|||||||
print("Cannot authenticate API key: " + str(e))
|
print("Cannot authenticate API key: " + str(e))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
req_limit = res.get('req_limit', None) if res.get('error', None) is None else None
|
if res.get('error') is not None:
|
||||||
char_limit = res.get('char_limit', None) if res.get('error', None) is None else None
|
return None
|
||||||
|
|
||||||
|
req_limit = res.get('req_limit', None)
|
||||||
|
char_limit = res.get('char_limit', None)
|
||||||
|
|
||||||
self.cache[api_key] = (req_limit, char_limit)
|
self.cache[api_key] = (req_limit, char_limit)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user