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

Incorrect format returned if the form is not valid. #766

Open
Anthony-DE-FARIA opened this issue May 16, 2024 · 0 comments
Open

Incorrect format returned if the form is not valid. #766

Anthony-DE-FARIA opened this issue May 16, 2024 · 0 comments

Comments

@Anthony-DE-FARIA
Copy link

In my django template:

{{ form.amount_to_invest }}
{{ form.amount_to_invest.value }}
{{ form.amount_to_invest.value.amount }}

with

    amount_to_invest = MoneyField(
        max_digits=19, decimal_places=4, default_currency="EUR", null=True
    )

will show

Capture d’écran 2024-05-16 à 16 52 16

Now if I raise an error and the form is not valid after submission this is what I can get:

Capture d’écran 2024-05-16 à 16 53 19

It's not an instance of Money anymore in case of an error, it's a list.

Is that a normal behavior? I was expecting a Money instance.

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