fix: Update only modified annotations
This commit is contained in:
parent
a74f9d52ba
commit
e68b5c3e34
@ -83,7 +83,7 @@ class WhiteboardModel extends SystemConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
PresAnnotationDAO.insertOrUpdateMap(newAnnotationsMap)
|
||||
PresAnnotationDAO.insertOrUpdateMap(annotationsAdded)
|
||||
|
||||
val newWb = wb.copy(annotationsMap = newAnnotationsMap)
|
||||
saveWhiteboard(newWb)
|
||||
|
@ -64,12 +64,12 @@ object PresAnnotationDAO {
|
||||
)
|
||||
}
|
||||
|
||||
def insertOrUpdateMap(annotations: Map[String, AnnotationVO]) = {
|
||||
def insertOrUpdateMap(annotations: Array[AnnotationVO]) = {
|
||||
DatabaseConnection.db.run(
|
||||
DBIO.sequence(
|
||||
annotations.map { annotation =>
|
||||
prepareInsertOrUpdate(annotation._2)
|
||||
}
|
||||
prepareInsertOrUpdate(annotation)
|
||||
}.toVector
|
||||
).transactionally
|
||||
)
|
||||
.onComplete {
|
||||
|
Loading…
Reference in New Issue
Block a user