Additional checks for SystemLogger

This commit is contained in:
= 2021-08-27 21:27:13 +10:00
parent dd4dbf566b
commit f2a8d94f3f

View File

@ -55,6 +55,10 @@ class SystemLogger implements ShouldQueue
MultiDB::setDb($this->company->db); MultiDB::setDb($this->company->db);
$client_id = $this->client ? $this->client->id : null; $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; $user_id = $this->client ? $this->client->user_id : $this->company->owner()->id;
$sl = [ $sl = [