From adb7f5b2ca9e8394db314f7ff97d0d0f811c51c0 Mon Sep 17 00:00:00 2001 From: Nicu Tofan Date: Sat, 23 Jun 2018 17:40:53 +0300 Subject: Switch from subtasks to cards in model --- models/cards.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'models/cards.js') diff --git a/models/cards.js b/models/cards.js index 1e001501..8cf0ef65 100644 --- a/models/cards.js +++ b/models/cards.js @@ -221,15 +221,15 @@ Cards.helpers({ }, subtasks() { - return Subtasks.find({cardId: this._id}, {sort: { sort: 1 } }); + return Cards.find({parentId: this._id}, {sort: { sort: 1 } }); }, subtasksCount() { - return Subtasks.find({cardId: this._id}).count(); + return Cards.find({parentId: this._id}).count(); }, subtasksFinishedCount() { - return Subtasks.find({cardId: this._id, isFinished: true}).count(); + return Cards.find({parentId: this._id, archived: true}).count(); }, subtasksFinished() { -- cgit v1.2.3-1-g7c22