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

Fixed float param bug #339

Merged
merged 1 commit into from
May 31, 2022
Merged

Fixed float param bug #339

merged 1 commit into from
May 31, 2022

Conversation

krichardsson
Copy link
Contributor

When a parameter that is a float or double is set, the value is converted to an int and the decimals are lost.

This PR fixes the problem by using the type of the parameter to decide if it syould be cast to int of float before packing it.

It would have been nicer to add this knowledge to the ParamTocElement class but the param cache stores the full python class and when reading an old cache we get instances of the old ParamTocElement class. Adding new functionality to the ParamTocElement class means we would have to clear the cache somehow.

@krichardsson krichardsson merged commit cc989ad into master May 31, 2022
@krichardsson krichardsson deleted the krichardsson/float-param-bug branch May 31, 2022 08:34
@krichardsson krichardsson added this to the next-release milestone May 31, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants