Skip to content

Commit

Permalink
#609 Prevent tag duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 11, 2018
1 parent cdef0e1 commit 2aa1141
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ActionOperationSrv @Inject() (
RetryOnError() { // FIXME find the right exception
for {
caze findCaseEntity(entity)
_ caseSrv.update(caze, Fields.empty.set("tags", Json.toJson(caze.tags() :+ tag)), ModifyConfig(retryOnConflict = 0, version = Some(caze.version)))
_ caseSrv.update(caze, Fields.empty.set("tags", Json.toJson((caze.tags() :+ tag).distinct)), ModifyConfig(retryOnConflict = 0, version = Some(caze.version)))
} yield operation.updateStatus(ActionOperationStatus.Success, "")
}
case _ Future.successful(operation)
Expand Down

0 comments on commit 2aa1141

Please sign in to comment.