Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard complaining about price_currency #3

Open
dismine opened this issue Feb 5, 2020 · 0 comments
Open

Dashboard complaining about price_currency #3

dismine opened this issue Feb 5, 2020 · 0 comments

Comments

@dismine
Copy link

dismine commented Feb 5, 2020

price_currency = forms.ChoiceField(choices=CURRENCY_CHOICES)

If left this code as it is the dashboard start complaining about not filled values for Stock and pricing. This happens in my case because the default choice field widget has no empty value. This is why an empty extra form always change initial value for price_currency from None to first value from settings.OSCAR_CURRENCIES.

Just setting initial should help in this case.

price_currency = forms.ChoiceField(initial=settings.OSCAR_CURRENCIES[0], choices=CURRENCY_CHOICES)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant