Fix location store for tag.

This commit is contained in:
James Cole
2020-01-02 19:25:42 +01:00
parent e1577a4a76
commit c55ef9c77b
4 changed files with 31 additions and 34 deletions

View File

@@ -399,13 +399,13 @@ class TagRepository implements TagRepositoryInterface
$tag->tag = $data['tag'];
$tag->date = $data['date'];
$tag->description = $data['description'];
$tag->latitude = $data['latitude'];
$tag->longitude = $data['longitude'];
$tag->zoomLevel = $data['zoom_level'];
$tag->latitude = null;
$tag->longitude = null;
$tag->zoomLevel = null;
$tag->save();
// update, delete or create location:
$updateLocation = $data['has_location'] ?? false;
$updateLocation = $data['update_location'] ?? false;
// location must be updated?
if (true === $updateLocation) {