diff --git a/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php b/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php index 95bbfc3..7c19fd9 100644 --- a/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php +++ b/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php @@ -233,7 +233,7 @@ private function createDeal($complexId, $room) !$deal = Deal::create([ 'agent_id' => $this->agentId, 'complex_id' => $complexId, - 'plan7_data' => ($room) ? json_encode($room) : null + 'plan7_data' => (is_array($room) && array_key_exists('id', $room)) ? json_encode($room) : null ]) ) { return false;