18559: Fix group detail refresh bug
[arvados-workbench2.git] / src / store / processes / process-update-actions.ts
index f8d78bc60a0a94930afa8689bf059b85f055b92f..c7fd1b55d4baf9ff5bde6f33dcae9b572c2bcf3c 100644 (file)
@@ -4,13 +4,13 @@
 
 import { Dispatch } from "redux";
 import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
-import { RootState } from "~/store/store";
-import { dialogActions } from "~/store/dialog/dialog-actions";
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
-import { ServiceRepository } from "~/services/services";
-import { getProcess } from '~/store/processes/process';
-import { projectPanelActions } from '~/store/project-panel/project-panel-action';
-import {snackbarActions, SnackbarKind} from '~/store/snackbar/snackbar-actions';
+import { RootState } from "store/store";
+import { dialogActions } from "store/dialog/dialog-actions";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "services/common-service/common-resource-service";
+import { ServiceRepository } from "services/services";
+import { getProcess } from 'store/processes/process';
+import { projectPanelActions } from 'store/project-panel/project-panel-action';
+import {snackbarActions, SnackbarKind} from 'store/snackbar/snackbar-actions';
 
 export interface ProcessUpdateFormDialogData {
     uuid: string;
@@ -41,7 +41,7 @@ export const updateProcess = (resource: ProcessUpdateFormDialogData) =>
             return updatedProcess;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
-            if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+            if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
                 dispatch(stopSubmit(PROCESS_UPDATE_FORM_NAME, { name: 'Process with the same name already exists.' } as FormErrors));
             } else {
                 dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_UPDATE_FORM_NAME }));