2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 11:40:58 +00:00

Currency migrations - stop migrations when defaults change (#4975)

* make currency choices independend

* replace hard coded default currency

* use function for psql?

* use callable default

* revert some fields

* also migrat all currency codes
This commit is contained in:
Matthias Mair
2023-06-07 12:05:37 +02:00
committed by GitHub
parent 192c1ecb21
commit d7d3d8aa26
10 changed files with 28 additions and 15 deletions

View File

@ -23,6 +23,11 @@ def currency_code_default():
return code
def all_currency_codes():
"""Returns a list of all currency codes."""
return [(a, CURRENCIES[a].name) for a in CURRENCIES]
def currency_code_mappings():
"""Returns the current currency choices."""
return [(a, CURRENCIES[a].name) for a in settings.CURRENCIES]