Fix account name validator and make sure the location CRUD works in the API for accounts.

This commit is contained in:
James Cole
2019-12-30 20:44:52 +01:00
parent 0ae52198e7
commit e1186b48ec
9 changed files with 170 additions and 52 deletions

View File

@@ -134,7 +134,7 @@ class AccountFactory
$this->updateNote($return, $data['notes'] ?? '');
// store location
if (true === ($data['has_location'] ?? true) && null !== $return) {
if (true === ($data['has_location'] ?? false) && null !== $return) {
$location = new Location;
$location->latitude = $data['latitude'] ?? 52.3167;
$location->longitude = $data['longitude'] ?? 5.55;