Ver Fonte

Fix import error 500

while running an import from a previously exported board, we encounter
the following error:

Exception while invoking method 'importBoard' Error: Did not check() all arguments during call to 'importBoard'
    at ArgumentChecker.throwUnlessAllArgumentsHaveBeenChecked (packages/check.js:483:13)
    at Object._failIfArgumentsAreNotAllChecked (packages/check.js:131:16)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
    at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Promise (packages/ddp-server/livedata_server.js:715:46)
    at new Promise (<anonymous>)
    at Session.method (packages/ddp-server/livedata_server.js:689:23)
    at packages/mdg_meteor-apm-agent.js:2617:38
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Session.sessionProto.protocol_handlers.method (packages/mdg_meteor-apm-agent.js:2616:44)
    at packages/ddp-server/livedata_server.js:559:43

Commit 4cf98134491b587 removed the checks as the original board might
not have all the required fields, but we actually still need to run
a general check on all parameters
Benjamin Tissoires há 6 anos atrás
pai
commit
35ffd02814
1 ficheiros alterados com 4 adições e 4 exclusões
  1. 4 4
      models/import.js

+ 4 - 4
models/import.js

@@ -3,10 +3,10 @@ import { WekanCreator } from './wekanCreator';
 
 Meteor.methods({
   importBoard(board, data, importSource, currentBoard) {
-    //check(board, Object);
-    //check(data, Object);
-    //check(importSource, String);
-    //check(currentBoard, Match.Maybe(String));
+    check(board, Object);
+    check(data, Object);
+    check(importSource, String);
+    check(currentBoard, Match.Maybe(String));
     let creator;
     switch (importSource) {
     case 'trello':