From b40bf0a903aa980907e46bcbe743741deac210b8 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 18 Aug 2023 12:44:23 +0200 Subject: [PATCH] Update AnrThreatService.php Fixed the threatRate inheritance flag set when instance risks update is enforced. --- src/Service/AnrThreatService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/AnrThreatService.php b/src/Service/AnrThreatService.php index c6cd1b65..74dd2a89 100755 --- a/src/Service/AnrThreatService.php +++ b/src/Service/AnrThreatService.php @@ -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; } @@ -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; }