3
0
mirror of https://github.com/snipe/snipe-it.git synced 2025-10-29 11:21:21 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
snipe
e698e71137
Merge pull request #18100 from marcusmoore/fixes/20318-license-seat-display-name
Added null safe operator in case of missing license
2025-10-28 09:29:25 +00:00
Marcus Moore
1f499e0d44
Add null safe operator in case of missing license 2025-10-27 10:47:55 -07:00

View File

@ -76,7 +76,7 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
protected function displayName(): Attribute
{
return Attribute:: make(
get: fn(mixed $value) => $this->license->name,
get: fn(mixed $value) => $this->license?->name,
);
}