fix 500 error on file browser

This commit is contained in:
Boy132 2025-05-08 14:04:09 +02:00
parent 378059625e
commit c2364a845b
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,8 @@ class FileResource extends Resource
protected static string|\BackedEnum|null $navigationIcon = 'tabler-files'; protected static string|\BackedEnum|null $navigationIcon = 'tabler-files';
protected static bool $isScopedToTenant = false;
// TODO: find better way handle server conflict state // TODO: find better way handle server conflict state
public static function canAccess(): bool public static function canAccess(): bool
{ {

View File

@ -150,6 +150,10 @@ class File extends Model
*/ */
public function getRows(): array public function getRows(): array
{ {
if (!isset(self::$server)) {
return [];
}
try { try {
$fileRepository = (new DaemonFileRepository())->setServer(self::$server); $fileRepository = (new DaemonFileRepository())->setServer(self::$server);