Skip to content

LIMS-2040: Fix bug creating more than one puck#1019

Merged
ndg63276 merged 1 commit intopre-release/2026-R1.3from
fix/LIMS-2040/error-creating-more-than-one-puck
Feb 3, 2026
Merged

LIMS-2040: Fix bug creating more than one puck#1019
ndg63276 merged 1 commit intopre-release/2026-R1.3from
fix/LIMS-2040/error-creating-more-than-one-puck

Conversation

@ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-2040

Summary:

Creating a puck, and then creating another, gives an internal server error. This was introduced by #965, as parentContainerId and parentContainerLocation are reset to empty strings between pucks, rather than nulls. The backend also doesn't sanitise the input, so the database throws an error.

Changes:

  • Fix the frontend - so parentContainerId and Location are reset to nulls between pucks
  • Fix the backend - coerce empty fields to nulls for those 2 fields
  • Add more to the error message to help debugging in future
  • NB one way to fix the error would be to define parentContainerId/Location as \d+ rather than \d*. But they need to be \d* for the case where you are deleting the parentContainer.

To test:

  • Go to any proposal, any shipment (new or existing)
  • Create a puck with at least one sample
  • Create a second puck (without refreshing the page or clicking back or anything), check no errors occur. The payload sent should have parentContainerId as null, not "".
  • Remove the frontend fix. repeat the test, check the backend fixes work :)

@ndg63276 ndg63276 changed the base branch from master to pre-release/2026-R1.3 February 3, 2026 09:46
@ndg63276 ndg63276 merged commit d10c549 into pre-release/2026-R1.3 Feb 3, 2026
2 checks passed
@ndg63276 ndg63276 deleted the fix/LIMS-2040/error-creating-more-than-one-puck branch February 3, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants