Skip to content

Commit

Permalink
Fixed setting specific risk for the operational risks during the import.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanbaidan committed Nov 26, 2024
1 parent aae88ef commit 7c12005
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public function processOperationalInstanceRisksData(
/** @var Entity\MonarcObject $object */
$object = $instance->getObject();
$operationalInstanceRisk = $this->anrInstanceRiskOpService
->createInstanceRiskOpObject($instance, $object, $operationalRisk, $operationalInstanceRiskData);
->createInstanceRiskOpObject($instance, $object, $operationalRisk, $operationalInstanceRiskData)
->setSpecific($operationalInstanceRiskData['specific'] ?? 0);
if ($this->importCacheHelper->getValueFromArrayCache('with_eval')) {
$operationalInstanceRisk
->setBrutProb((int)$operationalInstanceRiskData['brutProb'])
Expand Down
3 changes: 0 additions & 3 deletions src/Service/AnrInstanceRiskOpService.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,6 @@ public function createInstanceRiskOpObject(
'riskCacheDescription4' => $rolfRisk->getDescription(4),
] : ['riskCacheDescription' . $anr->getLanguage() => $data['riskCacheDescription']])
->setCreator($this->connectedUser->getEmail());
if ($rolfRisk === null) {
$instanceRiskOp->setSpecific(CoreEntity\InstanceRiskOpSuperClass::TYPE_SPECIFIC);
}

$this->instanceRiskOpTable->save($instanceRiskOp, false);

Expand Down

0 comments on commit 7c12005

Please sign in to comment.