strapi-utils
Advanced tools
Comparing version 3.0.0-alpha.6.7 to 3.0.0-alpha.7
@@ -272,10 +272,15 @@ 'use strict'; | ||
if (!strapi.models.hasOwnProperty(model)) { | ||
const models = _.assign(_.clone(strapi.models), Object.keys(strapi.plugins).reduce((acc, current) => { | ||
_.assign(acc, _.get(strapi.plugins[current], ['models'], {})); | ||
return acc; | ||
}, {})); | ||
if (!models.hasOwnProperty(model)) { | ||
return this.log.error(`The model ${model} can't be found.`); | ||
} | ||
const connector = strapi.models[model].orm; | ||
const connector = models[model].orm; | ||
if (!connector) { | ||
throw new Error(`Impossible to determine the use ORM for the model ${model}.`); | ||
throw new Error(`Impossible to determine the ORM used for the model ${model}.`); | ||
} | ||
@@ -282,0 +287,0 @@ |
{ | ||
"name": "strapi-utils", | ||
"version": "3.0.0-alpha.6.7", | ||
"version": "3.0.0-alpha.7", | ||
"description": "Shared utilities for the Strapi packages", | ||
@@ -5,0 +5,0 @@ "homepage": "http://strapi.io", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20764
562