Skip to content

Commit

Permalink
Fix too tight assertions in annotation saving (#7326)
Browse files Browse the repository at this point in the history
  • Loading branch information
fm3 authored Sep 8, 2023
1 parent 3d1183e commit d695791
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed that the deletion of a selected segment would crash the segments tab. [#7316](https://github.com/scalableminds/webknossos/pull/7316)
- Fixed reading sharded Zarr 3 data from the local file system. [#7321](https://github.com/scalableminds/webknossos/pull/7321)
- Fixed no-bucket data zipfile when downloading volume annotations. [#7323](https://github.com/scalableminds/webknossos/pull/7323)
- Fixed too tight assertions when saving annotations, leading to failed save requests. [#7326](https://github.com/scalableminds/webknossos/pull/7326)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ trait TracingController[T <: GeneratedMessage, Ts <: GeneratedMessage] extends C
userToken: Option[String]): Fox[Long] =
for {
previousActionGroupsToCommit <- tracingService.getAllUncommittedFor(tracingId, updateGroup.transactionId)
_ <- bool2Fox(previousActionGroupsToCommit.exists(_.transactionGroupIndex == 0)) ?~> s"Trying to commit a transaction without a group that has transactionGroupIndex 0."
_ <- bool2Fox(
previousActionGroupsToCommit
.exists(_.transactionGroupIndex == 0) || updateGroup.transactionGroupCount == 1) ?~> s"Trying to commit a transaction without a group that has transactionGroupIndex 0."
commitResult <- commitUpdates(tracingId, previousActionGroupsToCommit :+ updateGroup, userToken)
_ <- tracingService.removeAllUncommittedFor(tracingId, updateGroup.transactionId)
} yield commitResult
Expand Down

0 comments on commit d695791

Please sign in to comment.