A free open source IT asset/license management system
Fix for asset location null on user
snipe6b63808e346a
diff --git a/app/Models/Asset.php b/app/Models/Asset.phpindex 51ba984948..bf92e2f977 100644--- a/app/Models/Asset.php+++ b/app/Models/Asset.php@@ -262,11 +262,12 @@ class Asset extends Depreciablereturn $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();}