A free open source IT asset/license management system
Fixes all assets showing as unassigned in license checkout
snipebe7598b27956
diff --git a/app/Models/Asset.php b/app/Models/Asset.phpindex ffda8141e8..2f7d221157 100644--- a/app/Models/Asset.php+++ b/app/Models/Asset.php@@ -179,13 +179,14 @@ class Asset extends Depreciablepublic function getDetailedNameAttribute(){- if ($this->assignedTo) {- $user_name = $this->assignedTo->present()->name();+ if ($this->assignedto) {+ $user_name = $this->assignedto->present()->name();} else {$user_name = "Unassigned";}return $this->asset_tag . ' - ' . $this->name . ' (' . $user_name . ') ' . $this->model->name;}+public function validationRules($id = '0'){return $this->rules;