Skip to content

Commit

Permalink
Merge pull request #108 from Hussam92/master
Browse files Browse the repository at this point in the history
Bugfix: Default TicketType updates wrong Model
  • Loading branch information
mihaisolomon authored Mar 18, 2024
2 parents c850876 + 344dc53 commit 5498216
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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]);
}
Expand Down

0 comments on commit 5498216

Please sign in to comment.