Skip to content

Commit

Permalink
#511 Create new project hangs indefinetely
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriána Kohanová committed Jan 29, 2021
1 parent e78af5e commit c7bd5a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/components/preview/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ export const unmountPreviewComponent = (stages = []) => dispatch => {
}
});

dispatch(resetTrackingState());

dispatch(resetCurrentCompoundsSettings(true));
dispatch(resetProjectsReducer());

dispatch(resetSelectionState());
dispatch(resetDatasetsState());

dispatch(resetTrackingState());
};

export const resetReducersForRestoringActions = () => dispatch => {
Expand Down
4 changes: 4 additions & 0 deletions js/components/projects/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { createInitSnapshotFromCopy, getListOfSnapshots } from '../../snapshot/r
import { SnapshotType } from './constants';
import { DJANGO_CONTEXT } from '../../../utils/djangoContext';
import { sendInitTrackingActionByProjectId } from '../../../reducers/tracking/dispatchActions';
import { resetTrackingState } from '../../../reducers/tracking/actions';

import moment from 'moment';

export const assignSnapshotToProject = ({ projectID, snapshotID, ...rest }) => (dispatch, getState) => {
Expand Down Expand Up @@ -320,6 +322,7 @@ export const createProjectFromSnapshot = ({ title, description, author, tags, hi
const snapshotData = JSON.parse(selectedSnapshot && selectedSnapshot.data);

dispatch(setProjectModalIsLoading(true));
dispatch(resetTrackingState());
return dispatch(
createProject({
title,
Expand Down Expand Up @@ -365,6 +368,7 @@ export const createProjectFromScratch = ({ title, description, target, author, t
getState
) => {
dispatch(setProjectModalIsLoading(true));
dispatch(resetTrackingState());
return api({
url: `${base_url}/api/session-projects/`,
method: METHOD.POST,
Expand Down

0 comments on commit c7bd5a3

Please sign in to comment.