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

Attempting to create a project from a submission with a decimal value results in an error #3680

Closed
wes-otf opened this issue Dec 5, 2023 · 4 comments · Fixed by #3692
Closed
Assignees
Labels
Type: Bug Bugs! Things that are broken :-/

Comments

@wes-otf
Copy link
Contributor

wes-otf commented Dec 5, 2023

When attempting to create a project from an accepted submission that has Requested Funding with a decimal value (ie. 5478.50), the error Field 'value' expected a number but got <decimal funding value> is produced.

I believe this issue lies within the project model only accepting a positive integer.

@wes-otf wes-otf added the Type: Bug Bugs! Things that are broken :-/ label Dec 5, 2023
@wes-otf
Copy link
Contributor Author

wes-otf commented Dec 5, 2023

I can take a stab at this one

@wes-otf wes-otf self-assigned this Dec 5, 2023
@frjo
Copy link
Member

frjo commented Dec 5, 2023

We have earlier taken measures to only allow int values here. But since you have seen flots it is not working 100%.

@wes-otf
Copy link
Contributor Author

wes-otf commented Dec 5, 2023

So this should be an integer across the board? I've seen quite a few existing submissions on production that had cents in the requested funds

@frjo
Copy link
Member

frjo commented Dec 5, 2023

My comment only refer to the "Requested amount" custom field. I know OTF do not use that mush anymore, opting for a generic field instead. Do not now/remember the reasoning around that.

But values in generic fields are not copied over to projects so should not matter.

frjo pushed a commit that referenced this issue Dec 16, 2023
…#3692)

Fixes #3680. Swaps the PositiveInteger field for a DecimalField with a
validator that ensures the input value is >= 0. Ensures project creation
no longer generates an exception when a project's `Requested Funding`
field has a decimal.
wes-otf added a commit that referenced this issue May 7, 2024
…#3692)

Fixes #3680. Swaps the PositiveInteger field for a DecimalField with a
validator that ensures the input value is >= 0. Ensures project creation
no longer generates an exception when a project's `Requested Funding`
field has a decimal.
wes-otf added a commit that referenced this issue May 8, 2024
…#3692)

Fixes #3680. Swaps the PositiveInteger field for a DecimalField with a
validator that ensures the input value is >= 0. Ensures project creation
no longer generates an exception when a project's `Requested Funding`
field has a decimal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bugs! Things that are broken :-/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants