[ARVADOS-WORKBENCH2] updated: 1.4.1-133-g150c23dd

Git user git at public.curoverse.com
Tue Dec 3 15:40:00 UTC 2019


Summary of changes:
 src/store/collections/collection-create-actions.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

       via  150c23ddbb21c3127742925c8d2303084d75fb4d (commit)
      from  86b3f9b37aaf49fdfb6b6f3f502659ed11b968be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 150c23ddbb21c3127742925c8d2303084d75fb4d
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Dec 3 10:38:32 2019 -0500

    15256: Fixes error handling when collection creation fails
    
    Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/src/store/collections/collection-create-actions.ts b/src/store/collections/collection-create-actions.ts
index 8d1e9ba5..1534ae63 100644
--- a/src/store/collections/collection-create-actions.ts
+++ b/src/store/collections/collection-create-actions.ts
@@ -40,7 +40,7 @@ export const openCollectionCreateDialog = (ownerUuid: string) =>
 export const createCollection = (data: CollectionCreateFormDialogData) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         dispatch(startSubmit(COLLECTION_CREATE_FORM_NAME));
-        let newCollection: CollectionResource;
+        let newCollection: CollectionResource | undefined;
         try {
             dispatch(progressIndicatorActions.START_WORKING(COLLECTION_CREATE_FORM_NAME));
             newCollection = await services.collectionService.create(data);
@@ -61,7 +61,7 @@ export const createCollection = (data: CollectionCreateFormDialogData) =>
                     hideDuration: 2000,
                     kind: SnackbarKind.ERROR
                 }));
-                await services.collectionService.delete(newCollection!.uuid);
+                if (newCollection) { await services.collectionService.delete(newCollection.uuid); }
             }
             dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_CREATE_FORM_NAME));
             return;

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list