mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-23 08:16:14 +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:
1 parent
192c1ecb21
commit
d7d3d8aa26
10 files changed
+28
-15
No files matched your search
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user