mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-01-11 12:28:39 +00:00
fix tests
This commit is contained in:
parent
51000b7022
commit
9f39e01172
|
|
@ -129,8 +129,10 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
/** @var Profile $profile Profile */
|
/** @var Profile $profile Profile */
|
||||||
$profile = ProfileMapper::get()->where('account', (int) $account)->execute();
|
$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;
|
return $employees;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user