#1953 Temporal fix
This commit is contained in:
parent
f42f46dc42
commit
9947021736
|
@ -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`);
|
||||
|
||||
|
|
Loading…
Reference in New Issue