mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Fixes all assets showing as unassigned in license checkout
This commit is contained in:
parent
1a7e3fbb4b
commit
be7598b279
|
@ -179,13 +179,14 @@ class Asset extends Depreciable
|
|||
|
||||
public 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;
|
||||
|
|
Loading…
Reference in a new issue