Pārlūkot izejas kodu

fix cards export

6eeb708e4d2eb82f (Fix cards export and add customFields export.) is
incomplete as it allows to export newer cards inserted in the db after
the linkedId has been set, but not older cards present in an earlier
version of wekan.

Allow both null and empty value to be retrieved to match all cards.

related #1873
Benjamin Tissoires 6 gadi atpakaļ
vecāks
revīzija
24f66c9f88
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      models/export.js

+ 1 - 1
models/export.js

@@ -48,7 +48,7 @@ class Exporter {
 
 
   build() {
   build() {
     const byBoard = { boardId: this._boardId };
     const byBoard = { boardId: this._boardId };
-    const byBoardNoLinked = { boardId: this._boardId, linkedId: '' };
+    const byBoardNoLinked = { boardId: this._boardId, linkedId: {$in: ['', null] } };
     // we do not want to retrieve boardId in related elements
     // we do not want to retrieve boardId in related elements
     const noBoardId = {
     const noBoardId = {
       fields: {
       fields: {