Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,6 @@ type Preparation = {

function* prepareSplitOrMerge(isSkeletonProofreading: boolean): Saga<Preparation | null> {
const volumeTracingLayer = yield* select((state) => getActiveSegmentationTracingLayer(state));
const annotationVersion = yield* select((state) => state.annotation.version);
const volumeTracing = yield* select((state) => getActiveSegmentationTracing(state));
if (volumeTracingLayer == null || volumeTracing == null) {
return null;
Expand Down Expand Up @@ -1410,6 +1409,9 @@ function* prepareSplitOrMerge(isSkeletonProofreading: boolean): Saga<Preparation
return null;
}

// Getting latest annotation version as it might have changed due to e.g. making the mapping editable.
const annotationVersion = yield* select((state) => state.annotation.version);

Comment on lines +1412 to +1414
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The fix is easy: Load the annotation version !after! the mapping was potentially made editable (which changes the version).

The returned annotationVersion of this function as later used in the sagas handling split operations. On the master the version before making the mapping editable was returned.
=> This lead to the proofreading sagas requesting edges to split with an annotation version, where the version was actually lower than the version where it was made editable. Thus, the server correctly replied with an error.

=> Moving the select "lower" in the function fixed the bug easily

return {
agglomerateFileMag,
getDataValue,
Expand Down
2 changes: 2 additions & 0 deletions unreleased_changes/9412.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Fixed
- Fixed a bug where the initial operation of a proofreading annotation failed if it is split action.
Loading