Permalink
Browse files

fix last commit

  • Loading branch information...
masylum committed Jan 2, 2011
1 parent 4e5cb8b commit 0c34b3dd476e14d771c6559a2aff6b2848397d68
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/model.js
View
@@ -99,7 +99,7 @@ module.exports = function (db, collection_name) {
if (!validator.hasErrors()) {
model.onCreateInstance(element, function (error, element) {
model.mongoCall('insert', element, function (error, element) {
- if (element[0]) {
+ if (element) {
validator.updated_model = element[0];
}
callback(error, validator);

0 comments on commit 0c34b3d

Please sign in to comment.