Skip to content
Snippets Groups Projects
Commit 4fad2a98 authored by Teemu Autto's avatar Teemu Autto
Browse files

Handle missing territory, falling back to reference currency.

parent a9b4382c
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,10 @@ def get_preferred_currency():
return str(current_user.currency)
# Fall back to the default currency for the locale
return get_territory_currencies(get_locale().territory)[0]
if territory := get_locale().territory:
return get_territory_currencies(territory)[0]
else:
return REF_CURRENCY
@click.command()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment