Currency options fix (#12343)

- Ensure currency options are loaded dynamically
This commit is contained in:
Oliver 2026-07-10 00:21:01 +10:00 committed by GitHub
parent d4171f2dcf
commit ae12fa342a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -100,7 +100,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