Skip to content

Commit

Permalink
Added fallback current_team as the system_user's team
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsam726 committed Oct 19, 2023
1 parent f700adb commit 4be5aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 : null;
return Auth::check() ? Auth::user()->team : system_user()->team;
}
}

Expand Down

0 comments on commit 4be5aa9

Please sign in to comment.