Skip to content

Commit

Permalink
fix issue when entity removed from group
Browse files Browse the repository at this point in the history
  • Loading branch information
nopbyte committed Oct 9, 2017
1 parent c0525f0 commit ac7285c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/level-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ LevelStorage.prototype.removeEntityFromGroupPromise = function (group_name, owne
if (group_entities.length === entity.groups.length) {
return rollback(t_entities, t_groups, reject.bind(this, createError(409, "entity with id " + pkToString(getPk("entities", entity)) + " is not in group with group name " + group_name + " owned by " + owner + " seems there is an inconsistency")));
} else {
entity.groups = entity_groups;
group.entities = group_entities;
entity.groups = group_entities;
group.entities = entity_groups;
return updateSomething("entities", entity_pk, entity, t_entities);
}
}).then(function (result) {
Expand Down

0 comments on commit ac7285c

Please sign in to comment.