fix: condition always true
This commit is contained in:
parent
0ffa7e410a
commit
4a563d7885
1 changed files with 1 additions and 1 deletions
|
|
@ -297,7 +297,7 @@ export class BranchController extends Controller {
|
||||||
const { provinceId, districtId, subDistrictId, headOfficeId, bank, contact, code, ...rest } =
|
const { provinceId, districtId, subDistrictId, headOfficeId, bank, contact, code, ...rest } =
|
||||||
body;
|
body;
|
||||||
|
|
||||||
if (head && head.code.slice(0, -6) !== code) {
|
if (headOfficeId && head && head.code.slice(0, -6) !== code) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatus.BAD_REQUEST,
|
HttpStatus.BAD_REQUEST,
|
||||||
"Headoffice code not match with branch code",
|
"Headoffice code not match with branch code",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue