diff --git a/app/Http/Controllers/Auth/ContactRegisterController.php b/app/Http/Controllers/Auth/ContactRegisterController.php index d08f90b59f1c..424fa6c071bd 100644 --- a/app/Http/Controllers/Auth/ContactRegisterController.php +++ b/app/Http/Controllers/Auth/ContactRegisterController.php @@ -71,14 +71,12 @@ class ContactRegisterController extends Controller $client->number = $this->getNextClientNumber($client); $client->save(); - if(!$client->country_id && strlen($client->company->settings->country_id) > 1){ + if(!array_key_exists('country_id', $data) && strlen($client->company->settings->country_id) > 1){ $client->update(['country_id' => $client->company->settings->country_id]); } - // $this->getClientContact($data, $client); - return $client; }