Skip to content

Commit

Permalink
Merge branch 'master' into fix-manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelboca committed Apr 3, 2023
2 parents 0e9db08 + 6a47510 commit 1c90caa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -124,7 +124,7 @@ def link_for_harvest_object(id=None, guid=None, text=None):
obj = logic.get_action('harvest_object_show')(context, {'id': guid, 'attr': 'guid'})
id = obj.id

url = h.url_for('harvest.object_show', id=id)
url = h.url_for('harvester.object_show', id=id)
text = text or guid or id
link = '<a href="{url}">{text}</a>'.format(url=url, text=text)

Expand Down
2 changes: 1 addition & 1 deletion ckanext/harvest/templates/source/job/read.html
Expand Up @@ -69,7 +69,7 @@ <h3>{{ _('Document Errors') }}
{{ _('Remote content') }}
</a>
{% endif %}
<a href="{{ h.url_for('harvest.object_show', id=harvest_object_id) }}" class="btn btn-small">
<a href="{{ h.url_for('harvester.object_show', id=harvest_object_id) }}" class="btn btn-small">
{{ _('Local content') }}
</a>

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
8 changes: 2 additions & 6 deletions ckanext/harvest/utils.py
Expand Up @@ -686,12 +686,8 @@ def clear_view(id):
def delete_view(id):
try:
context = {'model': model, 'user': tk.c.user}

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

tk.get_action('harvest_source_delete')(context, {'id': id})

Expand Down
2 changes: 1 addition & 1 deletion setup.py
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

version = '1.5.1'
version = '1.5.2'

setup(
name='ckanext-harvest',
Expand Down

0 comments on commit 1c90caa

Please sign in to comment.