Currency options fix (#12343) (#12347)

- 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:
github-actions[bot]
2026-07-10 06:35:21 +10:00
committed by GitHub
co-authored by Oliver
parent 51859b7862
commit 04304c8182
+3 -1
View File
@@ -71,7 +71,9 @@ def money_kwargs(**kwargs):
kwargs['decimal_places'] = 6 kwargs['decimal_places'] = 6
if 'currency_choices' not in kwargs: 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(): if InvenTree.ready.isRunningMigrations():
# During migrations, avoid setting a default currency # During migrations, avoid setting a default currency