Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit 2cca8a8

Browse files
Updated model for groups so that when deleting a single group it doesn't wipe the groups array in the database.
1 parent 1b8da29 commit 2cca8a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/game.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ GameSchema.statics.removeGroup = function(ids, groupId, callback)
441441
}
442442
return this.update(
443443
query,
444-
{$pull: {groups: {"groups.group" : groupId }}},
444+
{$pull: {groups: {group : groupId }}},
445445
{multi: true},
446446
callback
447447
);

0 commit comments

Comments
 (0)