From e7f5feed065cc5d9c2f88f5971b179c9133c2948 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 10 Mar 2023 13:23:58 -0800 Subject: [PATCH] Handle mismatch in action_logs and asset assigned_type Signed-off-by: snipe --- app/Models/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index e992298d86..d0ee596c44 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -474,7 +474,7 @@ class Asset extends Depreciable */ public function assignedTo() { - return $this->morphTo('assigned', 'assigned_type', 'assigned_to')->withTrashed(); + return $this->morphTo('assigned', 'assigned_type', 'assigned_to')->whereNotNull('assigned_type')->withTrashed(); } /**