[ckan-changes] commit/ckan: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Fri Jun 17 18:02:21 UTC 2011
2 new changesets in ckan:
http://bitbucket.org/okfn/ckan/changeset/c8a3ad7e1575/
changeset: c8a3ad7e1575
branch: release-v1.4.1
user: kindly
date: 2011-06-17 20:01:16
summary: [search] fixed error when licence used in query string
affected #: 2 files (269 bytes)
--- a/ckan/lib/search/sql.py Fri Jun 17 13:17:38 2011 +0100
+++ b/ckan/lib/search/sql.py Fri Jun 17 19:01:16 2011 +0100
@@ -142,7 +142,7 @@
if isinstance(terms, basestring):
terms = terms.split()
- if hasattr(model.Package, field):
+ if field in model.package_table.c:
model_attr = getattr(model.Package, field)
for term in terms:
q = q.filter(make_like(model_attr, term))
--- a/ckan/tests/lib/test_package_search.py Fri Jun 17 13:17:38 2011 +0100
+++ b/ckan/tests/lib/test_package_search.py Fri Jun 17 19:01:16 2011 +0100
@@ -99,6 +99,11 @@
result = self.backend.query_for(model.Package).run(query=u'Expenditure Government China')
assert len(result['results']) == 0, self._pkg_names(result)
+ def test_3_licence(self):
+ ## this should result, but it is here to check that at least it does not error
+ result = self.backend.query_for(model.Package).run(query=u'license:"OKD::Other (PublicsDomain)"')
+ assert result['count'] == 0, result
+
# Quotation not supported now
## # multiple words quoted
## result = Search().search(u'"Government Expenditure"')
http://bitbucket.org/okfn/ckan/changeset/ebe572f56f66/
changeset: ebe572f56f66
branch: release-v1.4.1
user: kindly
date: 2011-06-17 20:01:47
summary: merge branch
affected #: 1 file (82 bytes)
--- a/ckan/tests/misc/test_stats.py Fri Jun 17 19:01:16 2011 +0100
+++ b/ckan/tests/misc/test_stats.py Fri Jun 17 19:01:47 2011 +0100
@@ -15,8 +15,6 @@
@classmethod
def setup_class(self):
- from ckan import plugins
- plugins.load('synchronous_search')
CreateTestData.create_search_test_data()
@classmethod
@@ -188,7 +186,7 @@
model.repo.commit_and_remove()
return pkg_name
-class fdsTestRateStatsSimple(TimedRevision):
+class TestRateStatsSimple(TimedRevision):
@classmethod
def setup_class(self):
model.repo.init_db()
@@ -247,7 +245,7 @@
assert res == 1, res
-class fdsTestRateStats(TimedRevision):
+class TestRateStats(TimedRevision):
@classmethod
def setup_class(self):
model.repo.init_db()
Repository URL: https://bitbucket.org/okfn/ckan/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list