Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update redirect_to in View controller #320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions ckanext/harvest/controllers/view.py
Expand Up @@ -46,7 +46,7 @@ def delete(self,id):
else:
h.flash_success(_('Harvesting source successfully inactivated'))

h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=id))
h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=id, __ckan_no_root=True))
except p.toolkit.ObjectNotFound:
abort(404,_('Harvest source not found'))
except p.toolkit.NotAuthorized:
Expand Down Expand Up @@ -74,7 +74,7 @@ def refresh(self, id):
msg = 'An error occurred: [%s]' % str(e)
h.flash_error(msg)

h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=id))
h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=id, __ckan_no_root=True))

def clear(self, id):
try:
Expand All @@ -89,7 +89,7 @@ def clear(self, id):
msg = 'An error occurred: [%s]' % str(e)
h.flash_error(msg)

h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=id))
h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=id, __ckan_no_root=True))

def show_object(self, id, ref_type='object'):

Expand Down Expand Up @@ -211,7 +211,7 @@ def abort_job(self, source, id):
msg = 'An error occurred: [%s]' % str(e)
abort(500,msg)

h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=source))
h.redirect_to(h.url_for('{0}_admin'.format(DATASET_TYPE_NAME), id=source, __ckan_no_root=True))

def show_last_job(self, source):

Expand Down