summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 8e1ffcaa..987ce330 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -721,6 +721,18 @@ Cards.helpers({
);
}
},
+
+ getArchived() {
+ if (this.isImportedCard()) {
+ const card = Cards.findOne({ _id: this.importedId });
+ return card.archived;
+ } else if (this.isImportedBoard()) {
+ const board = Boards.findOne({ _id: this.importedId});
+ return board.archived;
+ } else {
+ return this.archived;
+ }
+ },
});
Cards.mutations({