A free open source IT asset/license management system
Check if target is not null to retrieve the proper data
Ivan Nieto Vivanco0d860c0b72b5
diff --git a/app/Models/Loggable.php b/app/Models/Loggable.phpindex 53ff279a09..d0bbd10733 100644--- a/app/Models/Loggable.php+++ b/app/Models/Loggable.php@@ -93,8 +93,12 @@ trait Loggable{$settings = Setting::getSettings();$log = new Actionlog;- $log->target_type = get_class($target);- $log->target_id = $target->id;++ if($target != null){+ $log->target_type = get_class($target);+ $log->target_id = $target->id;++ }if (static::class == LicenseSeat::class) {$log->item_type = License::class;