Browse Source

Move every Actions.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)

Martin Filser 2 years ago
parent
commit
c7b554afd9
4 changed files with 7 additions and 7 deletions
  1. 1 1
      models/boards.js
  2. 2 2
      models/exporter.js
  3. 2 2
      models/server/ExporterCardPDF.js
  4. 2 2
      models/server/ExporterExcel.js

+ 1 - 1
models/boards.js

@@ -667,7 +667,7 @@ Boards.helpers({
 
     // copy rules, actions, and triggers
     const actionsMap = {};
-    Actions.find({ boardId: oldId }).forEach(action => {
+    ReactiveCache.getActions({ boardId: oldId }).forEach(action => {
       const id = action._id;
       delete action._id;
       action.boardId = _id;

+ 2 - 2
models/exporter.js

@@ -139,12 +139,12 @@ export class Exporter {
         ).fetch(),
       );
       result.actions.push(
-        ...Actions.find(
+        ...ReactiveCache.getActions(
           {
             _id: rule.actionId,
           },
           noBoardId,
-        ).fetch(),
+        ),
       );
     });
 

+ 2 - 2
models/server/ExporterCardPDF.js

@@ -90,12 +90,12 @@ class ExporterCardPDF {
             ).fetch(),
           );
           result.actions.push(
-            ...Actions.find(
+            ...ReactiveCache.getActions(
               {
                 _id: rule.actionId,
               },
               noBoardId,
-            ).fetch(),
+            ),
           );
         });
 

+ 2 - 2
models/server/ExporterExcel.js

@@ -92,12 +92,12 @@ class ExporterExcel {
         ).fetch(),
       );
       result.actions.push(
-        ...Actions.find(
+        ...ReactiveCache.getActions(
           {
             _id: rule.actionId,
           },
           noBoardId,
-        ).fetch(),
+        ),
       );
     });