Skip to content

Commit

Permalink
Issue #4 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wsiegenthaler committed Jan 19, 2018
1 parent ca53cf0 commit 33a9005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const prune = (model, instance, include) => {
const isModelInstance = (model, value) => value instanceof (model.Instance || model);

/* Compares primary key fields of two objects given their model and indicates whether they match */
const pkMatch = model => (a, b) => lo.every(model.primaryKeyAttributes.map(attr => a[attr] === b[attr]));
const pkMatch = model => (a, b) => lo.every(model.primaryKeyAttributes.map(attr => a[attr] == b[attr]));

/* Constructs a sequelize compatible 'where' object with primary keys as defined by 'model' and 'val' */
const pkWhere = (model, val) => lo.fromPairs(model.primaryKeyAttributes.map(attr => [attr, val[attr]]));
Expand Down

0 comments on commit 33a9005

Please sign in to comment.