Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
await dispatch<any>(uploadCollectionFiles(newCollection.uuid));
dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_CREATE_FORM_NAME }));
dispatch(reset(COLLECTION_CREATE_FORM_NAME));
- dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_CREATE_FORM_NAME));
return newCollection;
} catch (e) {
const error = getCommonResourceServiceError(e);
}));
await services.collectionService.delete(newCollection!.uuid);
}
- dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_CREATE_FORM_NAME));
return;
+ } finally {
+ dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_CREATE_FORM_NAME));
}
};
reduxForm<CollectionCreateFormDialogData>({
form: COLLECTION_CREATE_FORM_NAME,
onSubmit: (data, dispatch) => {
- dispatch(createCollection(data));
+ // Somehow an extra field called 'files' gets added, copy
+ // the data object to get rid of it.
+ dispatch(createCollection({ ownerUuid: data.ownerUuid, name: data.name, description: data.description }));
}
})
)(DialogCollectionCreate);