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 a bug in generating the product ID. #25

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

mgcam
Copy link
Member

@mgcam mgcam commented Feb 19, 2024

An existing bug in constructing a JSON representation for a Pydantic model when the plate_number attribute is 2 or larger resulted in incorrect IDs being generated. This came to light while testing https://github.com/wtsi-npg/npg_langqc against release 5.0.0 of this package.

The fix includes a return to using Pydantic models' built-in model_dump_json method in order to mitigate the risk that comes manual generation of JSON strings.

@mgcam mgcam requested a review from nerdstrike February 19, 2024 17:25
Copy link
Collaborator

@nerdstrike nerdstrike left a comment

Choose a reason for hiding this comment

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

Ah, this looks much more straightforward

An existing bug in constructing a JSON representation for
a Pydantic model when the plate_number attribute is 2 or
larger resulted in incorrect IDs being generated. This came
to light while testing https://github.com/wtsi-npg/npg_langqc
against release 5.0.0 of this package.

The fix includes a return to using Pydantic models' built-in
model_dump_json method in order to mitigate the risk that
comes manual generation of JSON strings.
@nerdstrike nerdstrike merged commit 22da492 into wtsi-npg:devel Feb 20, 2024
3 checks passed
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