mirror of
https://github.com/strapi/strapi.git
synced 2025-10-06 05:44:19 +00:00
Merge pull request #4904 from veitbjarsch/bugfix/entry-deletion
Entries should be deleted if query parameters contain associations
This commit is contained in:
commit
78120c0952
@ -177,7 +177,9 @@ module.exports = function createQueryBuilder({ model, modelKey, strapi }) {
|
||||
|
||||
const runDelete = async trx => {
|
||||
await deleteComponents(entry, { transacting: trx });
|
||||
await model.where(params).destroy({ transacting: trx, require: false });
|
||||
await model
|
||||
.where({ id: entry.id })
|
||||
.destroy({ transacting: trx, require: false });
|
||||
return entry.toJSON();
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user