Fixed bug with admins user was coming in check with current company

This commit is contained in:
Prashant Singh 2019-06-29 15:54:35 +05:30
parent 67c3eeb25e
commit 8ef75d2be7
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class DatabasePresenceVerifier extends BaseVerifier
{
$company = Company::getCurrent();
if (isset($company->id)) {
if (isset($company->id) && $table != 'admins') {
return $this->db->connection($this->connection)->table($table)->useWritePdo()->where ('company_id', '=', $company->id);
} else {
// apply the company id check dynamically here to eliminate unique validation woes