Skip to content

A free open source IT asset/license management system

fix query for item relationship to load properly

Godfrey M4934b6c4da14
diff --git a/app/Models/User.php b/app/Models/User.php
index 35964dc7f8..278c801bed 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -562,7 +562,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
{
return $this->hasMany(Actionlog::class, 'target_id')
->with('item')
- ->select(['id', 'target_id', 'target_type', 'action_type', 'filename', 'accept_signature', 'created_at', 'note'])
+ ->select(['id', 'target_id', 'target_type', 'action_type', 'filename', 'accept_signature', 'created_at', 'note', 'item_id', 'item_type'])
->where('target_type', self::class)
->where('action_type', 'accepted')
->whereNotNull('filename')