Skip to content

Commit

Permalink
fix null error
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed May 27, 2024
1 parent 170e3de commit 8176c61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Filament/Resources/GroupResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public static function form(Form $form): Form
->required(),
TextInput::make('nextcloud_folder_name')
->label('Nextcloud Folder Name')
->required(fn(Group $record) => !empty($record->nextcloud_folder_id))
->required(fn(Group|null $record
) => $record !== null && !empty($record->nextcloud_folder_id))
->hint('Leave empty if the group should not be allowed to access Nextcloud.')
->unique('groups', 'nextcloud_folder_name', ignoreRecord: true),
Textarea::make('description')->rows(5),
Expand Down

0 comments on commit 8176c61

Please sign in to comment.