#1953 Temporal fix
gitea/salix/master This commit looks good Details
gitea/salix/test This commit looks good Details

This commit is contained in:
Juan Ferrer 2019-12-19 12:17:53 +01:00
parent f42f46dc42
commit 9947021736
1 changed files with 12 additions and 7 deletions

View File

@ -26,17 +26,22 @@ module.exports = Self => {
let address = await models.Address.findOne({
where: {id: params.addressFk},
fields: ['id', 'clientFk'],
include: [
{relation: 'client',
scope: {
include: {
relation: 'type'
}
include: {
relation: 'client',
scope: {
include: {
relation: 'type'
}
}
]
}
});
// FIXME: #1953 Params should be declared with it's correct argument type
if (params.shipped)
params.shipped = new Date(params.shipped);
if (params.landed)
params.landed = new Date(params.landed);
if (!address)
throw new UserError(`This address doesn't exist`);