Add series_fingerprint to multiple images information form#981
Merged
malcolmbaig merged 2 commits intomainfrom Feb 10, 2026
Merged
Add series_fingerprint to multiple images information form#981malcolmbaig merged 2 commits intomainfrom
malcolmbaig merged 2 commits intomainfrom
Conversation
af01281 to
2346496
Compare
5965ee4 to
9dad496
Compare
2346496 to
3082848
Compare
- A hidden series_fingerprint field is embedded in the form on render - On POST the view compares it against current DB state to detect if the underlying series have changed - If stale, the user is redirected to add image details
3082848 to
9e7052f
Compare
Refactor the form by removing the explicit series_list parameter from the form constructor. The form now derives it from instance.series_with_multiple_images(), where instance is the study.
|
MatMoore
reviewed
Feb 9, 2026
| return redirect(self.get_success_url()) | ||
| return super().get(request, *args, **kwargs) | ||
|
|
||
| def post(self, request, *args, **kwargs): |
Contributor
There was a problem hiding this comment.
We have a mix of FormView control flow and our own here... would it be cleaner to get rid of FormView and just depend on View for this one?
Contributor
Author
There was a problem hiding this comment.
I think there's still some benefit to using it here in terms of what it handles for us, plus we can see at a glance what our custom behaviour is and otherwise safely assume it just works like our various other FormViews.
MatMoore
approved these changes
Feb 9, 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.



Description
If the multiple images information form is stale (eg—changes have been made to the series in a different tab), we need some way of detecting a mismatch between the series data persisted in the database, and the fields present on the multiple images form.
In this PR:
Jira link
https://nhsd-jira.digital.nhs.uk/browse/DTOSS-11827
Review notes
Review checklist