Skip to content

Commit

Permalink
Added stricter value checking on number.
Browse files Browse the repository at this point in the history
  • Loading branch information
dombesz committed Jul 19, 2012
1 parent e452785 commit b5eaa99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/adapters/postgres.js
Expand Up @@ -165,7 +165,7 @@ PG.prototype.toDatabase = function (prop, val) {
}
}
if (prop.type.name === 'Number') {
if (!val) {
if (!val && val!=0) {
if( prop.autoIncrement ) {
return 'DEFAULT';
}
Expand Down

0 comments on commit b5eaa99

Please sign in to comment.