Skip to content

Commit

Permalink
feat(alert): resume test also when marking false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
harunbleech committed Mar 12, 2024
1 parent a03664f commit f689481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/models/class-alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ public static function set_alert_state( $id = 0, $new_alert_state = null ) {
$alerts_table = Alerts_Table::get_table_name();
$data = [ 'alert_state' => $new_alert_state ];

// Resume test after alert is resolved.
if ( 1 === $new_alert_state ) {
// Resume test after alert is resolved or marked false positive.
if ( in_array( $new_alert_state, [ 1, 2 ], true ) ) {
$alert = self::get_item( $id );
$service = new Test_Service();
$service->resume_test( $alert->post_id );
Expand Down

0 comments on commit f689481

Please sign in to comment.