back errors fixed
gitea/salix/dev There was a failure building this commit
Details
gitea/salix/dev There was a failure building this commit
Details
This commit is contained in:
parent
31b5f689df
commit
efeba38fb4
|
@ -25,11 +25,9 @@ export default class Controller {
|
|||
|
||||
const town = selection.town;
|
||||
const province = town.province;
|
||||
const country = province.country;
|
||||
|
||||
this.address.city = town.name;
|
||||
this.address.provinceFk = province.id;
|
||||
this.address.countryFk = country.id;
|
||||
}
|
||||
|
||||
onResponse(response) {
|
||||
|
|
|
@ -32,11 +32,9 @@ export default class Controller {
|
|||
|
||||
const town = selection.town;
|
||||
const province = town.province;
|
||||
const country = province.country;
|
||||
|
||||
this.address.city = town.name;
|
||||
this.address.provinceFk = province.id;
|
||||
this.address.countryFk = country.id;
|
||||
}
|
||||
|
||||
onResponse(response) {
|
||||
|
|
|
@ -63,13 +63,13 @@ module.exports = Self => {
|
|||
if (!params.shipped && params.landed) {
|
||||
const shippedResult = await models.Agency.getShipped(params.landed,
|
||||
address.id, params.agencyModeFk, params.warehouseFk);
|
||||
params.shipped = shippedResult.shipped;
|
||||
params.shipped = shippedResult && shippedResult.shipped;
|
||||
}
|
||||
|
||||
if (params.shipped && !params.landed) {
|
||||
const landedResult = await models.Agency.getLanded(params.shipped,
|
||||
address.id, params.agencyModeFk, params.warehouseFk);
|
||||
params.landed = landedResult.landed;
|
||||
params.landed = landedResult && landedResult.landed;
|
||||
}
|
||||
|
||||
if (!params.userId && ctx.req && ctx.req.accessToken.userId)
|
||||
|
|
|
@ -63,7 +63,7 @@ module.exports = Self => {
|
|||
if (!isProductionBoss) {
|
||||
const zone = await models.Agency.getShipped(landed, addressId, agencyModeId, warehouseId);
|
||||
|
||||
if (zone.id != zoneId)
|
||||
if (!zone || zone.id != zoneId)
|
||||
throw new UserError(`You don't have privileges to change the zone`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue