Skip to content

Commit b93c05f

Browse files
committed
Make employeeType required in inetOrgPerson schema and simplify update handling in IdentitiesCrudService
1 parent 3d9afb2 commit b93c05f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/management/identities/_schemas/_parts/inetOrgPerson.part.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class inetOrgPerson extends Document {
6060
})
6161
public employeeNumber: string[];
6262

63-
@Prop({ type: String })
63+
@Prop({ type: String, required: true })
6464
public employeeType: string;
6565

6666
@Prop({ type: Array, of: String, required: true, default: [] })

src/management/identities/identities-crud.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export class IdentitiesCrudService extends AbstractIdentitiesService {
5555

5656
// if (update.state === IdentityState.TO_COMPLETE) {
5757
update = {
58-
...omit(update, ['inetOrgPerson']),
59-
inetOrgPerson: omit(update.inetOrgPerson, ['employeeNumber', 'employeeType']),
58+
...update,
6059
state: IdentityState.TO_VALIDATE,
6160
};
6261

0 commit comments

Comments
 (0)