diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 51ba984948..bf92e2f977 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -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(); }