fixup! Assert model exists
This commit is contained in:
parent
0bf7af104d
commit
867e3ca996
|
@ -127,6 +127,7 @@ Change.idForModel = function(modelName, modelId) {
|
|||
*/
|
||||
|
||||
Change.findOrCreate = function(modelName, modelId, callback) {
|
||||
assert(loopback.getModel(modelName), modelName + ' does not exist');
|
||||
var id = this.idForModel(modelName, modelId);
|
||||
var Change = this;
|
||||
|
||||
|
|
Loading…
Reference in New Issue