mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
return first() instead of exists()
This commit is contained in:
parent
2f15246fe4
commit
4ffe1981af
@ -1661,7 +1661,7 @@ class Import implements ShouldQueue
|
||||
$ninja_company = Company::find(config('ninja.ninja_default_company_id'));
|
||||
|
||||
/* If we already have a record of this user - move along. */
|
||||
if($client_contact = ClientContact::where(['email' => $owner->email, 'company_id' => $ninja_company->id])->exists())
|
||||
if($client_contact = ClientContact::where(['email' => $owner->email, 'company_id' => $ninja_company->id])->first())
|
||||
return $client_contact->client;
|
||||
|
||||
$ninja_client = ClientFactory::create($ninja_company->id, $ninja_company->owner()->id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user