From d6259836e06b00f6e1e0e3c11802565b90ffddb7 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 1 Mar 2019 14:41:09 +0200 Subject: [PATCH] - [Add Filter fix back](https://github.com/wekan/wekan/issues/2213), because there was no bug in filter fix. Thanks to xet7 ! Closes #2213, related #2209 --- models/swimlanes.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/swimlanes.js b/models/swimlanes.js index 1b18ba5d8..9da4afb5f 100644 --- a/models/swimlanes.js +++ b/models/swimlanes.js @@ -133,14 +133,14 @@ Swimlanes.helpers({ }, lists() { - return Lists.find(Filter.mongoSelector({ + return Lists.find({ boardId: this.boardId, swimlaneId: {$in: [this._id, '']}, archived: false, - }), { sort: ['sort'] }); + }, { sort: ['sort'] }); }, - allLists() { + myLists() { return Lists.find({ swimlaneId: this._id }); }, @@ -189,7 +189,7 @@ Swimlanes.mutations({ archive() { if (this.isTemplateSwimlane()) { - this.lists().forEach((list) => { + this.myLists().forEach((list) => { return list.archive(); }); } @@ -198,7 +198,7 @@ Swimlanes.mutations({ restore() { if (this.isTemplateSwimlane()) { - this.allLists().forEach((list) => { + this.myLists().forEach((list) => { return list.restore(); }); }