Skip to content

Commit

Permalink
remove description form permission upsert criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Sep 19, 2018
1 parent 1b4ea3b commit 301b7b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/permission.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ PermissionSchema.statics.upsert = function upsert(permission, done) {
//upsert
async.waterfall([
function findExistingPermission(next) {
Permission.findOne(_permission, next);
const criteria = _.merge({}, _permission);
delete criteria.description;
Permission.findOne(criteria, next);
},

function upsertPermission(found, next) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lykmapipo/permission",
"version": "0.2.1",
"version": "0.2.2",
"description": "An entity that defines permits(access rights) that are assignable to role(s) to control what role(s) can see and do.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 301b7b3

Please sign in to comment.