rollback: refs #6724 entry.js
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-04-15 13:13:40 +02:00
parent 78bd561122
commit 5c524ecc7d
1 changed files with 0 additions and 11 deletions

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');
});
}; };