Skip to content

Commit

Permalink
Merge pull request #11 from rowasc/patch-2
Browse files Browse the repository at this point in the history
$data-location has to be null otherwise the values array is not saved
  • Loading branch information
rowasc authored Sep 21, 2018
2 parents 31274f7 + bbe5169 commit 6b0e0be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Services/PlatformApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 6b0e0be

Please sign in to comment.