Fix for asset location null on user

This commit is contained in:
snipe 2017-09-25 11:25:15 -07:00
parent 34dfcb5add
commit 6b63808e34

View file

@ -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();
}