Check for Auth::user before trying to log id (for cli)

This commit is contained in:
snipe 2020-08-14 14:43:07 -07:00
parent b999c50a2e
commit f1a6308002
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -144,7 +144,9 @@ trait Loggable
$log->location_id = null;
$log->note = $note;
$log->user_id = Auth::user()->id;
if(Auth::user())
$log->user_id = Auth::user()->id;
$log->logaction('checkin from');
$params = [