Skip to content

Commit

Permalink
Fix appending task bbox to user bbox in annotation nml upload (#8280)
Browse files Browse the repository at this point in the history
* fix appending task bbox to user bbox in annotation nml upload

* add changelog entry

---------

Co-authored-by: Michael Büßemeyer <[email protected]>
  • Loading branch information
MichaelBuessemeyer and Michael Büßemeyer authored Dec 16, 2024
1 parent 6febb57 commit e1dd067
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed that the frontend did not ensure a minium length for annotation layer names. Moreover, names starting with a `.` are also disallowed now. [#8244](https://github.com/scalableminds/webknossos/pull/8244)
- Fixed a bug where in the add remote dataset view the dataset name setting was not in sync with the datasource setting of the advanced tab making the form not submittable. [#8245](https://github.com/scalableminds/webknossos/pull/8245)
- Fix read and update dataset route for versions 8 and lower. [#8263](https://github.com/scalableminds/webknossos/pull/8263)
- Fixed that task bounding boxes are again converted to user bounding boxes when uploading annotations via nmls. [#8280](https://github.com/scalableminds/webknossos/pull/8280)
- Added missing legacy support for `isValidNewName` route. [#8252](https://github.com/scalableminds/webknossos/pull/8252)
- Fixed some layout issues in the upload view. [#8231](https://github.com/scalableminds/webknossos/pull/8231)
- Fixed `FATAL: role "postgres" does not exist` error message in Docker compose. [#8240](https://github.com/scalableminds/webknossos/pull/8240)
Expand Down
4 changes: 2 additions & 2 deletions app/models/annotation/nml/NmlParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ class NmlParser @Inject()(datasetDAO: DatasetDAO) extends LazyLogging with Proto
taskBoundingBox: Option[BoundingBox] = if (sharedParsingParameters.isTaskUpload)
parseTaskBoundingBox(parameters \ "taskBoundingBox")
else None
userBoundingBoxes = parseBoundingBoxes(parameters \ "userBoundingBox")
} yield {
var userBoundingBoxes = parseBoundingBoxes(parameters \ "userBoundingBox")
if (!sharedParsingParameters.isTaskUpload) {
parseTaskBoundingBoxAsUserBoundingBox(parameters \ "taskBoundingBox", userBoundingBoxes)
.map(asUserBoundingBox => userBoundingBoxes :+ asUserBoundingBox)
.foreach(asUserBoundingBox => userBoundingBoxes = userBoundingBoxes :+ asUserBoundingBox)
}
NmlParsedParameters(
datasetIdOpt,
Expand Down

0 comments on commit e1dd067

Please sign in to comment.