Skip to content

Commit

Permalink
#203: SaveAs is not working anymore after returning an error in the r…
Browse files Browse the repository at this point in the history
…esponse (#207)
  • Loading branch information
allyoucanmap authored May 26, 2021
1 parent 15ff456 commit 0918ab7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions geonode_mapstore_client/client/js/epics/gnsave.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,17 @@ export const gnSaveContent = (action$, store) =>
'abstract': action.metadata.description,
'thumbnail_url': action.metadata.thumbnail
}),
action.showNotifications && successNotification({title: "saveDialog.saveSuccessTitle", message: "saveDialog.saveSuccessMessage"})
...(action.showNotifications
? [successNotification({title: "saveDialog.saveSuccessTitle", message: "saveDialog.saveSuccessMessage"})]
: [])
);
})
.catch((error) => {
return Observable.of(
saveError(error.data || error.message),
action.showNotifications && errorNotification({title: "map.mapError.errorTitle", message: "map.mapError.errorDefault"})
...(action.showNotifications
? [errorNotification({title: "map.mapError.errorTitle", message: "map.mapError.errorDefault"})]
: [])
);
})
.startWith(savingResource());
Expand Down
4 changes: 3 additions & 1 deletion geonode_mapstore_client/client/js/reducers/gnsave.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function gnsave(state = {}, action) {
case SAVING_RESOURCE :
case SAVE_DIRECT_CONTENT: {
return {
saving: true
saving: true,
error: undefined,
success: undefined
};
}
case SAVE_SUCCESS: {
Expand Down

0 comments on commit 0918ab7

Please sign in to comment.