Skip to content

Commit

Permalink
fix for #1326
Browse files Browse the repository at this point in the history
  • Loading branch information
particlebanana committed Mar 19, 2016
1 parent f0fd39a commit 6d9a8f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/waterline/utils/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ var normalize = module.exports = {
if (options && options[pk]) {

var coercePK;
if(!context.attributes[pk]) {
return pk;
}

if (context.attributes[pk].type == 'integer') {
coercePK = function(pk) {return +pk;};
} else if (context.attributes[pk].type == 'string') {
Expand Down

0 comments on commit 6d9a8f7

Please sign in to comment.