[LIMS-2005] Perform manufacturer serial number check when creating dewars#26
Merged
[LIMS-2005] Perform manufacturer serial number check when creating dewars#26
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #26 +/- ##
==========================================
+ Coverage 94.67% 94.68% +0.01%
==========================================
Files 42 42
Lines 1745 1751 +6
==========================================
+ Hits 1652 1658 +6
Misses 93 93 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ndg63276
reviewed
Jan 14, 2026
| registry_json: dict[str, Any] = code_response.json() | ||
| msn = registry_json.get("manufacturerSerialNumber") | ||
| if isinstance(params, TopLevelContainerIn) and msn is not None: | ||
| app_logger.error(f"{msn}, {params.manufacturerSerialNumber}") |
Collaborator
There was a problem hiding this comment.
Is this a debug message?
ndg63276
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA ticket: LIMS-2005
Summary:
To prevent users from accidentally submitting the wrong dewar, it was suggested by eBIC personnel to ask them to submit a MSN, which would be checked against the DewarRegistry table to ensure the correct MSN is used with the corresponding dewar code.
Changes:
To test:
To give one of the dewars in one of the existing shipments a manufacturer serial number, run the following in restored ISPyB:
/shipments/{shipmentId}/topLevelContainers, with the following body, expect 404 to be returned:{ "type": "dewar", "code": "DLS-BI-9966", "manufacturerSerialNumber": "serial123", }bar(or whatever you set it as), 201 should be returnednulland the manufacturer serial number tonew-code-123, check if a new dewar registry entry is created withnew-code-123as the manufacturer serial number