Skip to content

Commit ac7285c

Browse files
committed
fix issue when entity removed from group
1 parent c0525f0 commit ac7285c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/level-storage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ LevelStorage.prototype.removeEntityFromGroupPromise = function (group_name, owne
488488
if (group_entities.length === entity.groups.length) {
489489
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")));
490490
} else {
491-
entity.groups = entity_groups;
492-
group.entities = group_entities;
491+
entity.groups = group_entities;
492+
group.entities = entity_groups;
493493
return updateSomething("entities", entity_pk, entity, t_entities);
494494
}
495495
}).then(function (result) {

0 commit comments

Comments
 (0)