Tests fixed.

This commit is contained in:
EnesSacid-Buker 2022-06-03 13:49:23 +03:00 committed by GitHub
parent e85d27898c
commit 2f042dec4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,9 +56,7 @@ abstract class Factory extends BaseFactory
public function setCompany(): void public function setCompany(): void
{ {
$company_id = $this->getRawAttribute('company_id'); $this->company = $this->user->companies()->first();
$this->company = !empty($company_id) ? Company::find($company_id) : $this->user->companies()->first();
$this->company->makeCurrent(); $this->company->makeCurrent();