mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 03:17:11 +00:00
Prevent fall through in the model search method when a plugin is specified (#6004)
Signed-off-by: Aleksandr Yackovlev <a.yackovlev@corp.mail.ru>
This commit is contained in:
parent
a96d41eeca
commit
c9925f3fa8
@ -108,11 +108,11 @@ class DatabaseManager {
|
|||||||
return _.get(strapi.admin, ['models', key]);
|
return _.get(strapi.admin, ['models', key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
if (plugin) {
|
||||||
_.get(strapi.plugins, [plugin, 'models', key]) ||
|
return _.get(strapi.plugins, [plugin, 'models', key]);
|
||||||
_.get(strapi, ['models', key]) ||
|
}
|
||||||
_.get(strapi, ['components', key])
|
|
||||||
);
|
return _.get(strapi, ['models', key]) || _.get(strapi, ['components', key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
getModelByCollectionName(collectionName) {
|
getModelByCollectionName(collectionName) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user