mirror of
https://github.com/snipe/snipe-it.git
synced 2025-11-01 16:18:45 +00:00
Add null safe operator in case of missing license
This commit is contained in:
parent
32a2eed5ec
commit
1f499e0d44
@ -76,7 +76,7 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
|
|||||||
protected function displayName(): Attribute
|
protected function displayName(): Attribute
|
||||||
{
|
{
|
||||||
return Attribute:: make(
|
return Attribute:: make(
|
||||||
get: fn(mixed $value) => $this->license->name,
|
get: fn(mixed $value) => $this->license?->name,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user