Commit 4649176b authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix people.name NOT NULL violation — fallback to name_ar when English name is empty

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 328f4329
......@@ -197,7 +197,7 @@ public function save(ParticipantService $service): void
// Update person data
$this->participant->person->update([
'name_ar' => $this->name_ar,
'name' => $this->name ?: null,
'name' => $this->name ?: $this->name_ar,
'gender' => $this->gender,
'phone' => $this->phone ?: null,
'email' => $this->email ?: null,
......@@ -274,7 +274,7 @@ public function save(ParticipantService $service): void
} else {
$data['person'] = [
'name_ar' => $this->name_ar,
'name' => $this->name,
'name' => $this->name ?: $this->name_ar,
'national_id' => $this->national_id ?: null,
'date_of_birth' => $this->date_of_birth ?: null,
'gender' => $this->gender,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment