#1088 ticket.descriptor añadir polizon interval server error

This commit is contained in:
Gerard 2019-02-04 12:41:38 +01:00
parent 879c9b8877
commit 3869742fd7
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ module.exports = Self => {
Self.getPossibleStowaways = async ticketFk => {
let ship = await Self.app.models.Ticket.findById(ticketFk);
if (!ship || !ship.shipped)
return [];
let lowestDate = new Date(ship.shipped.getTime());
lowestDate.setHours(0, 0, -1, 0);