Fixed problem with import when using snipeit:import command (#6550)

This commit is contained in:
Hubert 2019-01-15 22:58:23 +01:00 committed by snipe
parent 75252bce05
commit 8420cb7ec1

View file

@ -41,7 +41,8 @@ trait Loggable
$settings = Setting::getSettings();
$log = new Actionlog;
$log = $this->determineLogItemType($log);
$log->user_id = Auth::user()->id;
if(Auth::user())
$log->user_id = Auth::user()->id;
if (!isset($target)) {
throw new Exception('All checkout logs require a target');