1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

fixes for client contact enforcement

This commit is contained in:
David Bomba 2021-09-10 07:44:58 +10:00
parent 03ec5e042d
commit f3a3e63ccb
2 changed files with 4 additions and 2 deletions

View File

@ -92,7 +92,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference
'custom_value4',
'email',
'is_primary',
'client_id',
// 'client_id',
];
/**

View File

@ -56,9 +56,11 @@ class ClientContactRepository extends BaseRepository
if (! $update_contact) {
$update_contact = ClientContactFactory::create($client->company_id, $client->user_id);
$update_contact->client_id = $client->id;
}
//10-09-2021 - enforce the client->id and remove client_id from fillables
$update_contact->client_id = $client->id;
/* We need to set NULL email addresses to blank strings to pass authentication*/
if(array_key_exists('email', $contact) && is_null($contact['email']))
$contact['email'] = '';