akaunting 3.0 (the last dance)
This commit is contained in:
@ -69,7 +69,7 @@ class IdentifyCompany
|
||||
{
|
||||
$company_id = $this->getCompanyIdFromQuery() ?: $this->getCompanyIdFromHeader();
|
||||
|
||||
return $company_id ?: optional($this->getFirstCompanyOfUser())->id;
|
||||
return $company_id ?: $this->getFirstCompanyOfUser()?->id;
|
||||
}
|
||||
|
||||
protected function getCompanyIdFromRoute()
|
||||
@ -86,4 +86,4 @@ class IdentifyCompany
|
||||
{
|
||||
return (int) $this->request->header('X-Company');
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user