[ckan-changes] commit/ckan: kindly: [home] home query fix

Bitbucket commits-noreply at bitbucket.org
Wed Jun 29 17:11:15 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/c48eb0a1b208/
changeset:   c48eb0a1b208
branch:      feature-1141-moderated-edits-ajax
user:        kindly
date:        2011-06-29 19:06:20
summary:     [home] home query fix
affected #:  1 file (59 bytes)

--- a/ckan/logic/action/get.py	Wed Jun 29 18:46:56 2011 +0200
+++ b/ckan/logic/action/get.py	Wed Jun 29 18:06:20 2011 +0100
@@ -30,7 +30,9 @@
     limit = context.get("limit")
 
     q = ckan.authz.Authorizer().authorized_query(user, model.PackageRevision)
-    # q = q.filter_by(state='active', current=True)
+    q = q.filter(model.PackageRevision.state=='active')
+    q = q.filter(model.PackageRevision.current==True)
+
     q = q.order_by(model.package_revision_table.c.revision_timestamp.desc())
     if limit:
         q = q.limit(limit)

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