fix tests

This commit is contained in:
Dennis Eichhorn 2023-09-27 21:42:23 +00:00
parent 51000b7022
commit 9f39e01172

View File

@ -130,7 +130,9 @@ final class ApiController extends Controller
foreach ($accounts as $account) {
/** @var Profile $profile Profile */
$profile = ProfileMapper::get()->where('account', (int) $account)->execute();
$employees[] = new Employee($profile);
$employee = EmployeeMapper::get()->where('profile', $profile->id)->execute();
$employees[] = $employee->id === 0 ? new Employee($profile) : $employee;
}
return $employees;