Handle mismatch in action_logs and asset assigned_type

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-03-10 13:23:58 -08:00
parent 65c2f27644
commit e7f5feed06

View file

@ -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();
}
/**