From 344dc539d4cafc826b7c4eb406dd9bf5a3e8020c Mon Sep 17 00:00:00 2001 From: Hussam Itani Date: Sun, 17 Mar 2024 14:16:34 +0100 Subject: [PATCH] Bugfix: Default TicketType does not updates wrong Model --- .../Resources/TicketTypeResource/Pages/EditTicketType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Filament/Resources/TicketTypeResource/Pages/EditTicketType.php b/app/Filament/Resources/TicketTypeResource/Pages/EditTicketType.php index 177b690b..d4d7bde8 100644 --- a/app/Filament/Resources/TicketTypeResource/Pages/EditTicketType.php +++ b/app/Filament/Resources/TicketTypeResource/Pages/EditTicketType.php @@ -3,7 +3,7 @@ namespace App\Filament\Resources\TicketTypeResource\Pages; use App\Filament\Resources\TicketTypeResource; -use App\Models\TicketStatus; +use App\Models\TicketType; use Filament\Pages\Actions; use Filament\Resources\Pages\EditRecord; @@ -22,7 +22,7 @@ protected function getActions(): array protected function afterSave(): void { if ($this->record->is_default) { - TicketStatus::where('id', '<>', $this->record->id) + TicketType::where('id', '<>', $this->record->id) ->where('is_default', true) ->update(['is_default' => false]); }