15557: Fix extraneous subprocesses on draft process subprocess panel
authorStephen Smith <stephen@curii.com>
Mon, 23 Jan 2023 19:16:35 +0000 (14:16 -0500)
committerStephen Smith <stephen@curii.com>
Mon, 23 Jan 2023 19:16:35 +0000 (14:16 -0500)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/subprocess-panel/subprocess-panel-middleware-service.ts

index 0f306ac076a475c525cec24509df5c3da507dafb..c622362788dc53943a29a9f9d5376bf63db66926 100644 (file)
@@ -39,17 +39,18 @@ export class SubprocessMiddlewareService extends DataExplorerMiddlewareService {
         try {
             api.dispatch(progressIndicatorActions.START_WORKING(this.getId()));
             const parentContainerRequest = await this.services.containerRequestService.get(parentContainerRequestUuid);
-            const containerRequests = await this.services.containerRequestService.list(
-                {
-                    ...getParams(dataExplorer, parentContainerRequest) ,
-                    select: containerRequestFieldsNoMounts
-                });
-
+            if (parentContainerRequest.containerUuid) {
+                const containerRequests = await this.services.containerRequestService.list(
+                    {
+                        ...getParams(dataExplorer, parentContainerRequest) ,
+                        select: containerRequestFieldsNoMounts
+                    });
+                api.dispatch(updateResources(containerRequests.items));
+                await api.dispatch<any>(loadMissingProcessesInformation(containerRequests.items));
+                // Populate the actual user view
+                api.dispatch(setItems(containerRequests));
+            }
             api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
-            api.dispatch(updateResources(containerRequests.items));
-            await api.dispatch<any>(loadMissingProcessesInformation(containerRequests.items));
-            // Populate the actual user view
-            api.dispatch(setItems(containerRequests));
         } catch {
             api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
             api.dispatch(couldNotFetchSubprocesses());