Added null coalescence for admin id in case via cli

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-03 20:52:12 +01:00
parent ec24120d2a
commit 1553ba5630

View file

@ -111,7 +111,7 @@ class LogListener
$logaction->target_type = User::class;
$logaction->action_type = 'merged';
$logaction->note = trans('general.merged_log_this_user_from', $to_from_array);
$logaction->user_id = $event->admin->id;
$logaction->user_id = $event->admin->id ?? null;
$logaction->save();
// Add a record to the users being merged TO
@ -122,7 +122,7 @@ class LogListener
$logaction->item_type = User::class;
$logaction->action_type = 'merged';
$logaction->note = trans('general.merged_log_this_user_into', $to_from_array);
$logaction->user_id = $event->admin->id;
$logaction->user_id = $event->admin->id ?? null;
$logaction->save();