Fixes in migration of templates and campaigns from Mailtrain ver 1

This commit is contained in:
Tomas Bures 2018-07-22 15:02:43 +05:30
parent 189638364c
commit ee786bc8ad
10 changed files with 89 additions and 18 deletions

View file

@ -91,7 +91,7 @@ async function remove(context, id) {
await knex.transaction(async tx => {
await shares.enforceEntityPermissionTx(tx, context, 'template', id, 'delete');
await reports.removeAllByReportTemplateIdTx(tx, context, id);
// FIXME - deal with deletion of dependent entities
await tx('templates').where('id', id).del();
});