- Ensure currency options are loaded dynamically
(cherry picked from commit ae12fa342a)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
51859b7862
commit
04304c8182
|
|
@ -71,7 +71,9 @@ def money_kwargs(**kwargs):
|
|||
kwargs['decimal_places'] = 6
|
||||
|
||||
if 'currency_choices' not in kwargs:
|
||||
kwargs['currency_choices'] = currency_code_mappings()
|
||||
# Pass the function itself (not the evaluated result) so that the
|
||||
# available currency options are resolved dynamically.
|
||||
kwargs['currency_choices'] = currency_code_mappings
|
||||
|
||||
if InvenTree.ready.isRunningMigrations():
|
||||
# During migrations, avoid setting a default currency
|
||||
|
|
|
|||
Loading…
Reference in New Issue