mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-03 13:56:32 +00:00
Fix remote API key database lookup
This commit is contained in:
parent
c782fe108b
commit
fa24655404
1 changed files with 5 additions and 2 deletions
|
@ -101,8 +101,11 @@ class RemoteDatabase:
|
|||
print("Cannot authenticate API key: " + str(e))
|
||||
return None
|
||||
|
||||
req_limit = res.get('req_limit', None) if res.get('error', None) is None else None
|
||||
char_limit = res.get('char_limit', None) if res.get('error', None) is None else None
|
||||
if res.get('error') is not 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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue