summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2018-08-21 22:20:45 +0200
committerAndrés Manelli <andresmanelli@gmail.com>2018-08-21 22:21:23 +0200
commit3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb (patch)
treeb36727b738aeda55d0c047d5e56ae19ec2d2b82c /models
parentb881c3b90824576ffcc75c7160a66c2314dab615 (diff)
downloadwekan-3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb.tar.gz
wekan-3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb.tar.bz2
wekan-3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb.zip
Fix and improve linked cards
Diffstat (limited to 'models')
-rw-r--r--models/cards.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 21a7f2ad..302beddc 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -712,6 +712,14 @@ Cards.helpers({
}
},
+ getId() {
+ if (this.isLinked()) {
+ return this.linkedId;
+ } else {
+ return this._id;
+ }
+ },
+
getTitle() {
if (this.isLinkedCard()) {
const card = Cards.findOne({ _id: this.linkedId });