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:
@ -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