fix: error on edit
This commit is contained in:
parent
c2da9aca2a
commit
4b963cf69c
1 changed files with 2 additions and 1 deletions
|
|
@ -227,7 +227,8 @@ export class ProductGroup extends Controller {
|
|||
}
|
||||
|
||||
let companyBefore = (record.registeredBranch.headOffice || record.registeredBranch).code;
|
||||
let companyAfter = branch ? (branch.headOffice || branch).code : false;
|
||||
let companyAfter =
|
||||
!!body.registeredBranchId && branch ? (branch.headOffice || branch).code : false;
|
||||
|
||||
if (companyBefore && companyAfter && companyBefore !== companyAfter) {
|
||||
throw new HttpError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue