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: zero decimal bug #5531

Merged
merged 7 commits into from
Jun 3, 2020
Merged

fix: zero decimal bug #5531

merged 7 commits into from
Jun 3, 2020

Conversation

nae701
Copy link
Contributor

@nae701 nae701 commented Jun 2, 2020

Description

Fixes issue #5282, where there was a bug that would not allow the insertion of valid decimals if they were equal to 0. This was due to an edge case in how BigDecimal calculates precision for zero decimal values. This patch adds a condition to check for zero decimal values and calculates their precision correctly.

Testing done

A unit test checking if the server allows the insertion of valid zero decimals was added to the rest-query-validation-tests folder.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@nae701 nae701 requested a review from agavra June 2, 2020 22:59
@nae701 nae701 requested a review from a team as a code owner June 2, 2020 22:59
@ghost
Copy link

ghost commented Jun 2, 2020

It looks like @nae701 hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement here.

Once you've signed reply with [clabot:check] to prove it.

Appreciation of efforts,

clabot

@nae701 nae701 changed the title fix zero decimal bug fix: zero decimal bug Jun 2, 2020
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @nae701 - crushing it :D left mostly minor comments

Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @nae701

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.

2 participants