fix Orgcontroller
This commit is contained in:
parent
aca680f4f4
commit
22324853db
4 changed files with 7 additions and 12 deletions
|
|
@ -82,7 +82,7 @@ export class OrgChild1Controller {
|
|||
const chkCode = await this.child1Repository.findOne({
|
||||
where: { id: id, orgChild1Code: requestBody.orgChild1Code },
|
||||
});
|
||||
if (chkCode != null) {
|
||||
if (chkCode?.id != id && chkCode != null) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "รหัสหน่วยงานนี้มีอยู่ในระบบแล้ว");
|
||||
}
|
||||
const child1 = await this.child1Repository.findOne({ where: { id } });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue