Răsfoiți Sursa

HUE-9000 [editor2] Fix properly sending operation context in fetchLogs

Romain 6 ani în urmă
părinte
comite
16ac085ce2

+ 1 - 1
desktop/core/src/desktop/js/api/apiHelper.js

@@ -2206,7 +2206,7 @@ class ApiHelper {
    */
   fetchLogs(options) {
     return new Promise(async (resolve, reject) => {
-      const data = options.executable.toContext();
+      const data = await options.executable.toContext();
       data.full_log = options.fullLog;
       data.jobs = options.jobs && JSON.stringify(options.jobs);
       data.from = options.from || 0;

+ 2 - 2
desktop/core/src/desktop/js/apps/notebook2/execution/executable.js

@@ -357,7 +357,7 @@ export default class Executable {
   async toContext(id) {
     if (this.executor.snippet) {
       return {
-        operationId: id || this.operationId,
+        operationId: this.operationId,
         snippet: this.executor.snippet.toContextJson(),
         notebook: await this.executor.snippet.parentNotebook.toContextJson()
       };
@@ -392,7 +392,7 @@ export default class Executable {
     };
 
     return {
-      operationId: id,
+      operationId: undefined,
       snippet: JSON.stringify(snippet),
       notebook: JSON.stringify(notebook)
     };