Skip to content

Commit 352524e

Browse files
committed
fixes
1 parent fdca99a commit 352524e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

app/models/annotation/Annotation.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,13 +746,13 @@ class AnnotationDAO @Inject()(sqlClient: SqlClient, annotationLayerDAO: Annotati
746746
def updateDescription(id: ObjectId, description: String)(implicit ctx: DBAccessContext): Fox[Unit] =
747747
for {
748748
_ <- assertUpdateAccess(id)
749-
_ <- run(q"UPDATE webknossos.annotations SET _description = $description WHERE _id = $id".asUpdate)
749+
_ <- run(q"UPDATE webknossos.annotations SET description = $description WHERE _id = $id".asUpdate)
750750
} yield ()
751751

752752
def updateName(id: ObjectId, name: String)(implicit ctx: DBAccessContext): Fox[Unit] =
753753
for {
754754
_ <- assertUpdateAccess(id)
755-
_ <- run(q"UPDATE webknossos.annotations SET _name = $name WHERE _id = $id".asUpdate)
755+
_ <- run(q"UPDATE webknossos.annotations SET name = $name WHERE _id = $id".asUpdate)
756756
} yield ()
757757

758758
def updateVisibility(id: ObjectId, visibility: AnnotationVisibility.Value)(implicit ctx: DBAccessContext): Fox[Unit] =

app/models/project/Project.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ class ProjectDAO @Inject()(sqlClient: SqlClient)(implicit ec: ExecutionContext)
8181

8282
// read operations
8383

84+
override def findAll(implicit ctx: DBAccessContext): Fox[List[Project]] =
85+
for {
86+
accessQuery <- readAccessQuery
87+
r <- run(q"SELECT $columns FROM $existingCollectionName WHERE $accessQuery ORDER BY created".as[ProjectsRow])
88+
parsed <- parseAll(r)
89+
} yield parsed
90+
8491
// Does not use access query (because they dont support prefixes). Use only after separate access check!
8592
def findAllWithTaskType(taskTypeId: String): Fox[List[Project]] =
8693
for {
@@ -151,7 +158,7 @@ class ProjectDAO @Inject()(sqlClient: SqlClient)(implicit ec: ExecutionContext)
151158
def updatePaused(id: ObjectId, isPaused: Boolean)(implicit ctx: DBAccessContext): Fox[Unit] =
152159
for {
153160
_ <- assertUpdateAccess(id)
154-
_ <- run(q"UPDATE webknossos.projects SET isPaused = $isPaused WHERE _id = $id".asUpdate)
161+
_ <- run(q"UPDATE webknossos.projects SET paused = $isPaused WHERE _id = $id".asUpdate)
155162
} yield ()
156163

157164
def countForTeam(teamId: ObjectId): Fox[Int] =

0 commit comments

Comments
 (0)