Skip to content

Commit 1f499e0

Browse files
committed
Add null safe operator in case of missing license
1 parent 32a2eed commit 1f499e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Models/LicenseSeat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function name(): Attribute
7676
protected function displayName(): Attribute
7777
{
7878
return Attribute:: make(
79-
get: fn(mixed $value) => $this->license->name,
79+
get: fn(mixed $value) => $this->license?->name,
8080
);
8181
}
8282

0 commit comments

Comments
 (0)