mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 22:47:32 -05: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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user