[ckan-changes] commit/ckan: John Glover: [api] Remove unnecessary call to session.query
Bitbucket
commits-noreply at bitbucket.org
Fri Jul 29 12:00:11 UTC 2011
1 new changeset in ckan:
http://bitbucket.org/okfn/ckan/changeset/0faaefcff3b9/
changeset: 0faaefcff3b9
user: John Glover
date: 2011-07-29 13:59:47
summary: [api] Remove unnecessary call to session.query
affected #: 1 file (163 bytes)
--- a/ckan/logic/action/get.py Fri Jul 29 12:03:02 2011 +0100
+++ b/ckan/logic/action/get.py Fri Jul 29 12:59:47 2011 +0100
@@ -469,10 +469,6 @@
limit = data_dict.get('limit', 5)
like_q = u'%' + q + u'%'
- query = session.query(model.ResourceRevision.format)\
- .filter(model.ResourceRevision.format.ilike(like_q))\
- .limit(limit)\
- .distinct()
query = session.query(model.ResourceRevision.format,
func.count(model.ResourceRevision.format).label('total'))\
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