forked from Ponysearch/Ponysearch
[fix] online_currency.py: if more alternatives, use the last in the list
If there are more than one ISO 4217 numeric codes [1] for a currency use the last one in the list of alternatives [2]. [1] https://en.wikipedia.org/wiki/ISO_4217#Active_codes_(list_one) [2] https://en.wikipedia.org/wiki/ISO_4217#Historical_codes Closes: https://github.com/searxng/searxng/issues/3713 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
2986681b31
commit
c96ba25f5b
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ def name_to_iso4217(name):
|
||||||
currency = CURRENCIES['names'].get(name, [name])
|
currency = CURRENCIES['names'].get(name, [name])
|
||||||
if isinstance(currency, str):
|
if isinstance(currency, str):
|
||||||
return currency
|
return currency
|
||||||
return currency[0]
|
return currency[-1]
|
||||||
|
|
||||||
|
|
||||||
def iso4217_to_name(iso4217, language):
|
def iso4217_to_name(iso4217, language):
|
||||||
|
|
Loading…
Reference in a new issue