mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fix for asset location null on user
This commit is contained in:
parent
34dfcb5add
commit
6b63808e34
|
@ -262,11 +262,12 @@ class Asset extends Depreciable
|
|||
return $this->assignedTo();
|
||||
}
|
||||
if ($this->assignedType() == self::USER) {
|
||||
if (!$this->assignedTo) {
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
return $this->assignedTo->userLoc();
|
||||
}
|
||||
if (!$this->assignedTo) {
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
|
||||
}
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue