Skip to content

Commit

Permalink
[TM-799] Corrected spelling error and verified existence of error att…
Browse files Browse the repository at this point in the history
…ribute.
  • Loading branch information
cesarLima1 committed May 15, 2024
1 parent cd6b3ec commit 9c65f0b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public function getAllCountryNames()

private function handlePolygonValidation($polygonUuid, $response, $criteriaId): JsonResponse
{
if ($response['error'] != null) {
if (isset($response['error']) && $response['error'] != null) {
$status = $response['status'];
unset($response['valid']);
unset($response['status']);
Expand All @@ -433,7 +433,7 @@ private function handlePolygonValidation($polygonUuid, $response, $criteriaId):
}

$response['insertion_success'] = App::make(PolygonService::class)
->createCriteraSite($polygonUuid, $criteriaId, $response['valid']);
->createCriteriaSite($polygonUuid, $criteriaId, $response['valid']);

return response()->json($response);
}
Expand Down

0 comments on commit 9c65f0b

Please sign in to comment.