fix: isMember

This commit is contained in:
Andras Bacsai
2024-04-05 18:47:07 +02:00
parent 8fe658bacc
commit db8ffe50ac
3 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ class Team extends Model implements SendsDiscord, SendsEmail
protected static function booted()
{
static::saving(function ($team) {
if (auth()->user()->isMember()) {
if (auth()->user()?->isMember()) {
throw new \Exception('You are not allowed to update this team.');
}
});