Skip to content

Commit

Permalink
In workflow viewer, prevent sql error by asserting non-empty run list (
Browse files Browse the repository at this point in the history
…#7299)

* In workflow viewer, prevent sql error by asserting non-empty run list

* 404
  • Loading branch information
fm3 committed Aug 29, 2023
1 parent 9e12cb4 commit 7899a2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/VoxelyticsController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class VoxelyticsController @Inject()(
Some(workflowHash),
conf.staleTimeout,
allowUnlisted = true)
_ <- runs.headOption ?~> "voxelytics.runNotFound" ~> NOT_FOUND
results <- voxelyticsDAO.getChunkStatistics(runs.map(_.id), taskName, conf.staleTimeout)
} yield JsonOk(Json.toJson(results))
}
Expand All @@ -237,6 +238,7 @@ class VoxelyticsController @Inject()(
Some(workflowHash),
conf.staleTimeout,
allowUnlisted = true)
_ <- runs.headOption ?~> "voxelytics.runNotFound" ~> NOT_FOUND
results <- voxelyticsDAO.getArtifactChecksums(runs.map(_.id), taskName, artifactName, conf.staleTimeout)
} yield JsonOk(Json.toJson(results))
}
Expand Down

0 comments on commit 7899a2e

Please sign in to comment.