Skip to content

Commit 344dc53

Browse files
author
Hussam Itani
committed
Bugfix: Default TicketType does not updates wrong Model
1 parent c6e8d89 commit 344dc53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Filament/Resources/TicketTypeResource/Pages/EditTicketType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Filament\Resources\TicketTypeResource\Pages;
44

55
use App\Filament\Resources\TicketTypeResource;
6-
use App\Models\TicketStatus;
6+
use App\Models\TicketType;
77
use Filament\Pages\Actions;
88
use Filament\Resources\Pages\EditRecord;
99

@@ -22,7 +22,7 @@ protected function getActions(): array
2222
protected function afterSave(): void
2323
{
2424
if ($this->record->is_default) {
25-
TicketStatus::where('id', '<>', $this->record->id)
25+
TicketType::where('id', '<>', $this->record->id)
2626
->where('is_default', true)
2727
->update(['is_default' => false]);
2828
}

0 commit comments

Comments
 (0)