From f2a8d94f3f0833960198373d0b4aaaff7d987d21 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 27 Aug 2021 21:27:13 +1000 Subject: [PATCH] Additional checks for SystemLogger --- app/Jobs/Util/SystemLogger.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Jobs/Util/SystemLogger.php b/app/Jobs/Util/SystemLogger.php index f4677cb2c72f..3775eda3faf6 100644 --- a/app/Jobs/Util/SystemLogger.php +++ b/app/Jobs/Util/SystemLogger.php @@ -55,6 +55,10 @@ class SystemLogger implements ShouldQueue MultiDB::setDb($this->company->db); $client_id = $this->client ? $this->client->id : null; + + if(!$this->client && !$this->company->owner()) + return; + $user_id = $this->client ? $this->client->user_id : $this->company->owner()->id; $sl = [