7253-devToTest_2418 #2350

Merged
alexm merged 320 commits from 7253-devToTest_2418 into test 2024-04-23 08:02:46 +00:00
1 changed files with 0 additions and 11 deletions
Showing only changes of commit 5c524ecc7d - Show all commits

View File

@ -46,15 +46,4 @@ module.exports = Self => {
} }
} }
}); });
Self.observe('before delete', async function(ctx) {
let isBooked = ctx.instance && ctx.instance.isBooked;
if (isBooked === undefined) {
const entryInstance = await Self.findById(ctx.where.id);
isBooked = entryInstance.isBooked;
}
if (isBooked) throw new Error('Booked entry cannot be deleted');
});
}; };