[mongodb data tampered](https://github.com/wekan/wekan-snap/issues/83).

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2019-03-01 07:05:49 +02:00
parent bd2c54398b
commit 90dd0ddb94

View file

@ -133,14 +133,14 @@ Swimlanes.helpers({
},
lists() {
return Lists.find({
return Lists.find(Filter.mongoSelector({
boardId: this.boardId,
swimlaneId: {$in: [this._id, '']},
archived: false,
}, { sort: ['sort'] });
}), { sort: ['sort'] });
},
myLists() {
allLists() {
return Lists.find({ swimlaneId: this._id });
},
@ -189,7 +189,7 @@ Swimlanes.mutations({
archive() {
if (this.isTemplateSwimlane()) {
this.myLists().forEach((list) => {
this.lists().forEach((list) => {
return list.archive();
});
}
@ -198,7 +198,7 @@ Swimlanes.mutations({
restore() {
if (this.isTemplateSwimlane()) {
this.myLists().forEach((list) => {
this.allLists().forEach((list) => {
return list.restore();
});
}