8144-devToTest_2444 #3137
|
@ -50,14 +50,12 @@ module.exports = Self => {
|
|||
}
|
||||
}
|
||||
};
|
||||
const promises = [];
|
||||
|
||||
const ticketList = await models.Ticket.find(filter, myOptions);
|
||||
|
||||
if (ticketList.length > 0)
|
||||
throw new UserError('There are tickets for this area, delete them first');
|
||||
|
||||
await Promise.all(promises);
|
||||
await models.Zone.destroyById(id, myOptions);
|
||||
|
||||
if (tx) await tx.commit();
|
||||
|
|
Loading…
Reference in New Issue