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

Fix ±0 is displayed for results within a range without uncertainty set #2426

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Nov 16, 2023

Description of the issue/feature this PR addresses

This Pull Request addresses a bug introduced with #2096. Until then, it was possible to define an uncertainty range without an Uncertainty value set:

Captura de 2023-11-16 12-59-53

This was handy for when the user wanted the system to not display the uncertainty for certain ranges (e.g when the result is between the detection limit and the quantification limit). With latest version, the system converts empties to 0 automatically:

Captura de 2023-11-16 13-00-47

And even though a 0 is meaningless as uncertainty, it gets displayed in results view and in results report.

This Pull Request makes the system to not render uncertainties if the uncertainty value is not above 0.

Current behavior before PR

System does render uncertainty of 0 or below 0 in results view and report

Captura de 2023-11-16 12-37-02

Desired behavior after PR is merged

System does not render uncertainty of 0 or below 0 in results view and report

Captura de 2023-11-16 12-25-38

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa changed the title Fix ±0 is displayed next to results within a range that does not have uncertainty set Fix ±0 is displayed for results within a range without uncertainty set Nov 16, 2023
@ramonski ramonski merged commit 717e88b into 2.x Nov 16, 2023
2 checks passed
@ramonski ramonski deleted the fix-uncertainty-zero branch November 16, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants