Skip to content

Commit

Permalink
Clean deprecated params attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelboca committed Mar 28, 2023
1 parent 4fddafc commit b6c87f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ckanext/harvest/helpers.py
Expand Up @@ -36,7 +36,7 @@ def package_list_for_source(source_id):
It calls the package_list snippet and the pager.
'''
limit = 20
page = int(request.params.get('page', 1))
page = int(request.args.get('page', 1))
fq = '+harvest_source_id:"{0}"'.format(source_id)
search_dict = {
'fq': fq,
Expand Down
2 changes: 1 addition & 1 deletion ckanext/harvest/templates/source/search.html
Expand Up @@ -31,7 +31,7 @@
(_('Last Modified'), 'metadata_modified desc'),
(_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ]
%}
{% snippet 'snippets/search_form.html', type='harvest', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, placeholder=_("Search harvest sources...") %}
{% snippet 'snippets/search_form.html', type='harvest', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.args, error=c.query_error, placeholder=_("Search harvest sources...") %}

{{ h.snippet('snippets/source_list.html', sources=c.page.items, show_organization=true) }}

Expand Down
2 changes: 1 addition & 1 deletion ckanext/harvest/utils.py
Expand Up @@ -687,7 +687,7 @@ def delete_view(id):
try:
context = {'model': model, 'user': tk.c.user}

context['clear_source'] = tk.request.params.get('clear',
context['clear_source'] = tk.request.args.get('clear',
'').lower() in (
u'true',
u'1',
Expand Down

0 comments on commit b6c87f4

Please sign in to comment.