Skip to content

Commit

Permalink
Merge branch 'py3-run-tests' into py3-run-tests-2
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Jan 16, 2020
2 parents 9029e43 + 143d283 commit a18ada3
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ckan/lib/dictization/model_dictize.py
Expand Up @@ -267,7 +267,7 @@ def _get_members(context, group, member_type):
def get_group_dataset_counts():
'''For all public groups, return their dataset counts, as a SOLR facet'''
query = search.PackageSearchQuery()
q = {'q': '+capacity:public',
q = {'q': '',
'fl': 'groups', 'facet.field': ['groups', 'owner_org'],
'facet.limit': -1, 'rows': 1}
query.run(q)
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/pagination.py
Expand Up @@ -650,7 +650,7 @@ def _range(self, regexp_match):
# Convert ..
dotdot = u'<span class="pager_dotdot">..</span>'
dotdot_link = tags.li(tags.a(u"...", href=u"#"), cls=u"disabled")
html = re.sub(dotdot, dotdot_link, html)
html = re.sub(dotdot, text_type(dotdot_link), html)

# Convert current page
text = u"%s" % self.page
Expand Down
4 changes: 2 additions & 2 deletions ckan/model/tracking.py
Expand Up @@ -31,8 +31,8 @@ class TrackingSummary(domain_object.DomainObject):
def get_for_package(cls, package_id):
obj = meta.Session.query(cls).autoflush(False)
obj = obj.filter_by(package_id=package_id)
data = obj.order_by(text('tracking_date desc')).first()
if data:
if meta.Session.query(obj.exists()).scalar():
data = obj.order_by(text('tracking_date desc')).first()
return {'total' : data.running_total,
'recent': data.recent_views}

Expand Down
3 changes: 1 addition & 2 deletions ckan/tests/legacy/__init__.py
Expand Up @@ -7,8 +7,7 @@
It registers the root directory of the project in sys.path and
pkg_resources, in case the project hasn't been installed with
setuptools. It also initializes the application via websetup (paster
setup-app) with the project's test.ini configuration file.
setuptools.
"""
import os
from unittest import TestCase
Expand Down
1 change: 0 additions & 1 deletion ckan/tests/legacy/test_coding_standards.py
Expand Up @@ -417,7 +417,6 @@ class TestPep8(object):
"ckan/tests/legacy/models/test_package_relationships.py",
"ckan/tests/legacy/monkey.py",
"ckan/tests/legacy/test_versions.py",
"ckan/websetup.py",
"ckanext/datastore/bin/datastore_setup.py",
"ckanext/datastore/logic/action.py",
"ckanext/datastore/tests/test_create.py",
Expand Down
1 change: 0 additions & 1 deletion ckan/tests/test_coding_standards.py
Expand Up @@ -576,7 +576,6 @@ def find_unprefixed_string_literals(filename):
u"ckan/tests/plugins/test_toolkit.py",
u"ckan/tests/test_authz.py",
u"ckan/tests/test_factories.py",
u"ckan/websetup.py",
u"ckanext/datapusher/cli.py",
u"ckanext/datapusher/helpers.py",
u"ckanext/datapusher/interfaces.py",
Expand Down
18 changes: 0 additions & 18 deletions ckan/websetup.py

This file was deleted.

0 comments on commit a18ada3

Please sign in to comment.