[Product-Developers] pas.plugins.sqlalchemy

derek auspex at pointerstop.ca
Mon Jan 31 04:19:32 UTC 2011


How does one report a bug against a collective component?

Specifically, pas.plugins.sqlalchemy gives me this traceback:
2011-01-30 23:43:21 ERROR Zope.SiteErrorLog
1296445401.680.910129289974 http://otn:9090/otn/@@usergroup-groupprefs
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module plone.app.controlpanel.usergroups, line 285, in __call__
  Module plone.app.controlpanel.usergroups, line 336, in doSearch
  Module Products.PlonePAS.tools.groupdata, line 463, in canDelete
  Module pas.plugins.sqlalchemy.plugin, line 55, in wrapper
  Module pas.plugins.sqlalchemy.plugin, line 639, in
allowDeletePrincipal
  Module pas.plugins.sqlalchemy.plugin, line 55, in wrapper
  Module pas.plugins.sqlalchemy.plugin, line 726, in getGroupById
  Module pas.plugins.sqlalchemy.plugin, line 55, in wrapper
  Module pas.plugins.sqlalchemy.plugin, line 579, in enumerateGroups
  Module sqlalchemy.sql.expression, line 1296, in __nonzero__
TypeError: Boolean value of this clause is not defined

This should fix it (because 'clause' may be a
<sqlalchemy.sql.expression.BooleanClauseList object > or None):

--- src/pas.plugins.sqlalchemy/src/pas/plugins/sqlalchemy/
plugin.py     (revision 231303)
+++ src/pas.plugins.sqlalchemy/src/pas/plugins/sqlalchemy/
plugin.py     (working copy)
@@ -590,7 +590,7 @@

         query = session.query(model.Group)

-        if clause:
+        if clause is not None:
             query = query.filter(clause)
         if sort_by:
             assert sort_by in ('name',)



More information about the Product-Developers mailing list