mirror of
https://github.com/Redume/Shirino.git
synced 2025-02-04 09:58:57 +03:00
fix: fixed the condition with getting currency from_currency
This commit is contained in:
parent
db79e74268
commit
ef980f1ef6
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class Converter:
|
||||||
for key in ['terms', 'privacy', 'timestamp']:
|
for key in ['terms', 'privacy', 'timestamp']:
|
||||||
data.pop(key, None)
|
data.pop(key, None)
|
||||||
|
|
||||||
if len(data.get('to')) == 0:
|
if not data.get('to'):
|
||||||
raise RuntimeError('Failed to get the exchange rate from DuckDuckGo')
|
raise RuntimeError('Failed to get the exchange rate from DuckDuckGo')
|
||||||
|
|
||||||
conv = data.get('to')[0]
|
conv = data.get('to')[0]
|
||||||
|
|
Loading…
Add table
Reference in a new issue