feat: prevent empty foreign id
This commit is contained in:
parent
69edca97b5
commit
1cae220655
1 changed files with 1 additions and 0 deletions
|
|
@ -326,6 +326,7 @@ export class EmployeeController extends Controller {
|
|||
|
||||
const listProvinceId = employeeCheckup?.reduce<string[]>((acc, cur) => {
|
||||
if (cur.provinceId && !acc.includes(cur.provinceId)) return acc.concat(cur.provinceId);
|
||||
if (!cur.provinceId) cur.provinceId = null;
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue