Merge pull request #2382 from strapi/fix-delete-all

Fix delete all
This commit is contained in:
Jim LAURIE 2018-11-27 14:52:41 +01:00 committed by GitHub
commit e5654758cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -584,7 +584,7 @@ module.exports = {
};
} else if (model.attributes[key]) {
field = model.attributes[key];
} else {
} else if (typeof key === 'string') {
// Remove the filter keyword at the end
let splitKey = key.split('_').slice(0, -1);
splitKey = splitKey.join('_');