diff --git a/app/Http/Controllers/V2/Terrafund/TerrafundCreateGeometryController.php b/app/Http/Controllers/V2/Terrafund/TerrafundCreateGeometryController.php index 0950c961a..f7893f39a 100644 --- a/app/Http/Controllers/V2/Terrafund/TerrafundCreateGeometryController.php +++ b/app/Http/Controllers/V2/Terrafund/TerrafundCreateGeometryController.php @@ -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']); @@ -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); }