From 631c7f2e68fa64b214098f83af5c0c735702788b Mon Sep 17 00:00:00 2001 From: pdelboca Date: Wed, 22 Mar 2023 09:18:37 -0300 Subject: [PATCH] Fix url_for routing to point to harvester blueprint. --- ckanext/harvest/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ckanext/harvest/utils.py b/ckanext/harvest/utils.py index 2ba94699..ca61490c 100644 --- a/ckanext/harvest/utils.py +++ b/ckanext/harvest/utils.py @@ -633,7 +633,7 @@ def job_abort_view(source, id): return tk.abort(500, msg) return h.redirect_to( - h.url_for('{0}.admin'.format(DATASET_TYPE_NAME), id=source)) + h.url_for('harvester.admin', id=source)) def refresh_view(id): @@ -663,7 +663,7 @@ def refresh_view(id): h.flash_error(msg) return h.redirect_to( - h.url_for('{0}.admin'.format(DATASET_TYPE_NAME), id=id)) + h.url_for('harvester.admin', id=id)) def clear_view(id): @@ -680,7 +680,7 @@ def clear_view(id): h.flash_error(msg) return h.redirect_to( - h.url_for('{0}.admin'.format(DATASET_TYPE_NAME), id=id)) + h.url_for('harvester.admin', id=id)) def delete_view(id): @@ -701,7 +701,7 @@ def delete_view(id): h.flash_success(_('Harvesting source successfully inactivated')) return h.redirect_to( - h.url_for('{0}.admin'.format(DATASET_TYPE_NAME), id=id)) + h.url_for('harvester.admin', id=id)) except tk.ObjectNotFound: return tk.abort(404, _('Harvest source not found')) except tk.NotAuthorized: