From 9ba1c34b2881cb00fbe6e47d841df8ba26c7bd64 Mon Sep 17 00:00:00 2001 From: Tony Partridge Date: Fri, 16 Feb 2024 14:37:23 +0000 Subject: [PATCH] Fix Team Saving issue (#164) If we have a team we want to save it, if we don't want don't want to pass anything. --- src/Resources/RoleResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/RoleResource.php b/src/Resources/RoleResource.php index fe55ee5..5ee9102 100644 --- a/src/Resources/RoleResource.php +++ b/src/Resources/RoleResource.php @@ -111,7 +111,7 @@ public static function form(Form $form): Form ->options( fn () => config('filament-spatie-roles-permissions.team_model', App\Models\Team::class)::pluck('name', 'id') ) - ->dehydrated(fn ($state) => (int) $state <= 0) + ->dehydrated(fn ($state) => (int) $state > 0) ->placeholder(__('filament-spatie-roles-permissions::filament-spatie.select-team')) ->hint(__('filament-spatie-roles-permissions::filament-spatie.select-team-hint')), ]),