From d8d8de0115d4e34c0f4315c1c3fc9d6c6233169b Mon Sep 17 00:00:00 2001 From: Sam Maosa Date: Thu, 19 Oct 2023 19:36:34 +0300 Subject: [PATCH] Use default team as a fallback --- src/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.php b/src/helpers.php index a55f298..1c0bc54 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -18,7 +18,7 @@ function team(string $code): ?Team if (!function_exists('Savannabits\Saas\current_team')) { function current_team(): ?Team { - return Auth::check() ? Auth::user()->team : system_user()->team; + return Auth::check() ? Auth::user()->team : \Savannabits\Saas\team('DEFAULT'); } }