Skip to content

Commit

Permalink
Fixed the converter of the recommendation's set data and the steps bl…
Browse files Browse the repository at this point in the history
…ob data save.
  • Loading branch information
ruslanbaidan committed Aug 23, 2024
1 parent 8c5159a commit d60283d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Import/Traits/ImportDataStructureAdapterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ private function prepareRecommendationData(
bool $isRiskTreated,
int $languageIndex
): array {
$recommendationSetUuid = $recommendationData['recommendationSet'] ?? '';
$recommendationSetUuid = $recommendationData['recommandationSet'] ?? '';

return [
'uuid' => $recommendationData['uuid'],
Expand Down
13 changes: 13 additions & 0 deletions src/Service/AnrService.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,19 @@ public function patch(Entity\Anr $anr, array $data): Entity\Anr
if (isset($data['manageRisks'])) {
$anr->setManageRisks($data['manageRisks']);
}
/* Context establishment texts. */
if (isset($data['contextAnaRisk'])) {
$anr->setContextAnaRisk($data['contextAnaRisk']);
}
if (isset($data['synthThreat'])) {
$anr->setSynthThreat($data['synthThreat']);
}
if (isset($data['contextGestRisk'])) {
$anr->setContextGestRisk($data['contextGestRisk']);
}
if (isset($data['synthAct'])) {
$anr->setSynthAct($data['synthAct']);
}
/* Label, description update */
if (isset($data['label']) && $anr->getLabel() !== $data['label']) {
$anr->setLabel($data['label']);
Expand Down

0 comments on commit d60283d

Please sign in to comment.