Merge pull request #4645 from Froelund/patch-7

Use the id of entry to update relations
This commit is contained in:
Alexandre BODIN 2019-12-09 10:07:11 +01:00 committed by GitHub
commit 6a9df0fcde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,7 +134,7 @@ module.exports = function createQueryBuilder({ model, modelKey, strapi }) {
if (Object.keys(relations).length > 0) {
return model.updateRelations(
Object.assign(params, { values: relations }),
{ id: entry.id, values: relations },
{ transacting: trx }
);
}