mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-21 08:51:34 +02:00
Merge pull request #5791 from turbo124/v5-develop
return first() instead of exists()
This commit is contained in:
commit
78f6e1cb86
@ -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…
Reference in New Issue
Block a user