Skip to content

Commit

Permalink
Merge pull request #31 from secultce/fix/show-documentary-opinion-error
Browse files Browse the repository at this point in the history
fix: Corrigindo atribuição de valor a array de critérios
  • Loading branch information
Junior-Shyko authored Dec 19, 2024
2 parents 2fd3009 + 1b4ac83 commit 715e0dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controllers/OpinionManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static function getCriteriaMeta(Opportunity $opportunity): array
'key' => 'criteria',
'owner' => $opportunity->evaluationMethodConfiguration,
]);
$criteria = json_decode($criteria->value, true);
$criteria = json_decode($criteria->value, true) ?? [];
$finalCriteria = [];
array_walk($criteria, function ($criterion) use (&$finalCriteria){
$finalCriteria[$criterion['id']] = $criterion;
Expand Down

0 comments on commit 715e0dd

Please sign in to comment.