Same but for tags.

This commit is contained in:
James Cole
2019-12-30 21:04:22 +01:00
parent e1186b48ec
commit a331b2d661
5 changed files with 61 additions and 32 deletions

View File

@@ -106,12 +106,12 @@ class AccountUpdateService
// location must be updated?
if (true === $updateLocation) {
// if all set to NULL, delete
if(null === $data['latitude'] && null === $data['longitude'] && null === $data['zoom_level']) {
if (null === $data['latitude'] && null === $data['longitude'] && null === $data['zoom_level']) {
$account->locations()->delete();
}
// otherwise, update or create.
if(!(null === $data['latitude'] && null === $data['longitude'] && null === $data['zoom_level'])) {
if (!(null === $data['latitude'] && null === $data['longitude'] && null === $data['zoom_level'])) {
$location = $this->accountRepository->getLocation($account);
if (null === $location) {
$location = new Location;