Skip to content

Commit 715c9aa

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents d65a909 + 139325d commit 715c9aa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/Models/Asset.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,10 @@ public function showAssetName()
376376
{
377377

378378
if ($this->name == '') {
379-
return $this->model->name.' ('.$this->asset_tag.')';
379+
if ($this->model) {
380+
return $this->model->name.' ('.$this->asset_tag.')';
381+
}
382+
return $this->asset_tag;
380383
} else {
381384
return $this->name;
382385
}

resources/views/dashboard.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@
120120
<td>{{ date("M d, Y g:iA", strtotime($activity->created_at)) }}</td>
121121
<td>
122122
@if ($activity->action_type!='requested')
123-
<a href="{{ route('view/user', $activity->user_id) }}">{{ $activity->adminlog->fullName() }}</a>
123+
@if ($activity->adminlog)
124+
<a href="{{ route('view/user', $activity->user_id) }}">{{ $activity->adminlog->fullName() }}</a>
125+
@else
126+
Deleted Admin
127+
@endif
124128
@endif
125129

126130
</td>

0 commit comments

Comments
 (0)