From b6ade0ccdd981765e52b6bcd66a52cc228525fd0 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Mon, 23 Jan 2023 14:16:35 -0500 Subject: [PATCH] 15557: Fix extraneous subprocesses on draft process subprocess panel Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- .../subprocess-panel-middleware-service.ts | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/store/subprocess-panel/subprocess-panel-middleware-service.ts b/src/store/subprocess-panel/subprocess-panel-middleware-service.ts index 0f306ac0..c6223627 100644 --- a/src/store/subprocess-panel/subprocess-panel-middleware-service.ts +++ b/src/store/subprocess-panel/subprocess-panel-middleware-service.ts @@ -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(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(loadMissingProcessesInformation(containerRequests.items)); - // Populate the actual user view - api.dispatch(setItems(containerRequests)); } catch { api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId())); api.dispatch(couldNotFetchSubprocesses()); -- 2.30.2