瀏覽代碼

fixup! Ref: original & and use fileObj.meta

David Arnold 4 年之前
父節點
當前提交
9de430fdc1
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      models/cards.js

+ 2 - 2
models/cards.js

@@ -738,12 +738,12 @@ Cards.helpers({
   attachments() {
   attachments() {
     if (this.isLinkedCard()) {
     if (this.isLinkedCard()) {
       return Attachments.find(
       return Attachments.find(
-        { cardId: this.linkedId },
+        { 'meta.cardId': this.linkedId },
         { sort: { uploadedAt: -1 } },
         { sort: { uploadedAt: -1 } },
       );
       );
     } else {
     } else {
       return Attachments.find(
       return Attachments.find(
-        { cardId: this._id },
+        { 'meta.cardId': this._id },
         { sort: { uploadedAt: -1 } },
         { sort: { uploadedAt: -1 } },
       );
       );
     }
     }