diff --git a/app/Services/PlatformApiService.php b/app/Services/PlatformApiService.php index b904c38..d69a6e1 100644 --- a/app/Services/PlatformApiService.php +++ b/app/Services/PlatformApiService.php @@ -67,6 +67,8 @@ public function savePost($ongoingReport) if($attribute->label === 'location') { if(!empty($data->location) && !empty($data->location->lat) && !empty($data->location->lon)) { $data->values[$attribute->key] = [$data->location]; + } else { + $data->location = null; } } else if($attribute->label === 'image' && isset($mediaId)) { $data->values[$attribute->key]=[$mediaId];