Skip to content

Commit

Permalink
fix: wrong endpoint name for redirect after page removal
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Jul 13, 2023
1 parent 170f8cf commit 6278186
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 6278186

Please sign in to comment.