Skip to content

Commit

Permalink
Merge pull request #128 from ckan/fix-page-removal
Browse files Browse the repository at this point in the history
fix: wrong endpoint name for redirect after page removal
  • Loading branch information
amercader committed Jul 14, 2023
2 parents 170f8cf + 6278186 commit ca68f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/pages/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def pages_delete(page, page_type='pages'):
try:
if tk.request.method == 'POST':
tk.get_action('ckanext_pages_delete')({}, {'page': page})
endpoint = 'index' if page_type in ('pages', 'page') else '%s_index' % page_type
endpoint = page_type + '_index'
return tk.redirect_to('pages.%s' % endpoint)
else:
return tk.abort(404, _('Page Not Found'))
Expand Down

0 comments on commit ca68f37

Please sign in to comment.