fixup! Assert model exists

This commit is contained in:
Ritchie Martori 2014-02-05 15:32:38 -08:00
parent 0bf7af104d
commit 867e3ca996
1 changed files with 1 additions and 0 deletions

View File

@ -127,6 +127,7 @@ Change.idForModel = function(modelName, modelId) {
*/ */
Change.findOrCreate = function(modelName, modelId, callback) { Change.findOrCreate = function(modelName, modelId, callback) {
assert(loopback.getModel(modelName), modelName + ' does not exist');
var id = this.idForModel(modelName, modelId); var id = this.idForModel(modelName, modelId);
var Change = this; var Change = this;