If not contacts array is passed, do no attempt to modify / save contacts
This commit is contained in:
parent
3a95441c1c
commit
df6e9bc9b8
1 changed files with 2 additions and 1 deletions
|
|
@ -102,7 +102,8 @@ class ClientRepository extends BaseRepository
|
|||
$data['name'] = $client->present()->name();
|
||||
}
|
||||
|
||||
$this->contact_repo->save($contact_data, $client);
|
||||
if(array_key_exists('contacts', $contact_data))
|
||||
$this->contact_repo->save($contact_data, $client);
|
||||
|
||||
return $client;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue