Skip to content

Commit

Permalink
Update AnrThreatService.php
Browse files Browse the repository at this point in the history
Fixed the threatRate inheritance flag set when instance risks update is enforced.
  • Loading branch information
ruslanbaidan authored Aug 18, 2023
1 parent ec00017 commit b40bf0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/AnrThreatService.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function manageQualification($id, $data)
];

// If qualification is not forced, retrieve only inherited instance risksx
if (!isset($data['forceQualification']) || $data['forceQualification'] === 0) {
if (empty($data['forceQualification'])) {
$filter['mh'] = 1;
}

Expand All @@ -77,7 +77,7 @@ public function manageQualification($id, $data)
$instanceRisk->threatRate = $data['qualification'];

// If qualification is forced, instances risks become inherited
if (isset($data['forceQualification']) && $data['forceQualification'] === 1) {
if (!empty($data['forceQualification'])) {
$instanceRisk->mh = 1;
}

Expand Down

0 comments on commit b40bf0a

Please sign in to comment.