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
parent 51859b7862
commit 04304c8182
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

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