From ea154dbadfeea288730d2c03bcd520a52b78d2ea Mon Sep 17 00:00:00 2001 From: WenRenHai <70972819+People-Sea@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:01:57 +0800 Subject: [PATCH] fix: error when only resources are configured for multi-tenancy and the authenticated user has no tenant (#17956) * fix: error when only resources are configured for multi-tenancy and the authenticated user has no tenant * Update packages/panels/src/Panel/Concerns/HasRoutes.php Signed-off-by: Dan Harrin --------- Signed-off-by: Dan Harrin Co-authored-by: Dan Harrin --- packages/panels/src/Panel/Concerns/HasRoutes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/panels/src/Panel/Concerns/HasRoutes.php b/packages/panels/src/Panel/Concerns/HasRoutes.php index 14cb1d41d9..65a0ddc144 100644 --- a/packages/panels/src/Panel/Concerns/HasRoutes.php +++ b/packages/panels/src/Panel/Concerns/HasRoutes.php @@ -179,7 +179,7 @@ trait HasRoutes return $this->getRedirectUrl($tenant); } - if (Route::has($homeRouteName = $this->generateRouteName('home'))) { + if (((! $hasTenancy) || $tenant) && Route::has($homeRouteName = $this->generateRouteName('home'))) { return route($homeRouteName, $tenant ? ['tenant' => $tenant] : []); }