Skip to content

Commit

Permalink
#856 Don't set alert status to "Update" if it is "New"
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Feb 13, 2019
1 parent 639558f commit de022a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thehive-backend/app/services/AlertSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class AlertSrv(

def update(alert: Alert, fields: Fields, modifyConfig: ModifyConfig)(implicit authContext: AuthContext): Future[Alert] = {
val follow = fields.getBoolean("follow").getOrElse(alert.follow())
val newStatus = if (follow) AlertStatus.Updated else alert.status()
val newStatus = if (follow && alert.status() != AlertStatus.New) AlertStatus.Updated else alert.status()
val updatedAlert = updateSrv(alert, fields.set("status", Json.toJson(newStatus)), modifyConfig)
alert.caze() match {
case Some(caseId) if follow
Expand Down

0 comments on commit de022a7

Please sign in to comment.