--- a/web/test/unittest_application.py Tue Sep 29 15:10:13 2009 +0200
+++ b/web/test/unittest_application.py Tue Sep 29 15:10:56 2009 +0200
@@ -138,6 +138,11 @@
class ApplicationTC(EnvBasedTC):
+ def setUp(self):
+ super(ApplicationTC, self).setUp()
+ def raise_hdlr(*args, **kwargs):
+ raise
+ self.app.error_handler = raise_hdlr
def publish(self, req, path='view'):
return self.app.publish(path, req)
@@ -411,6 +416,12 @@
self.assertRaises(AuthenticationError, self.publish, req, 'logout')
self.assertEquals(len(self.open_sessions), 0)
+ def test_non_regr_optional_first_var(self):
+ req = self.request()
+ # expect a rset with None in [0][0]
+ req.form['rql'] = 'rql:Any OV1, X WHERE X custom_workflow OV1?'
+ self.publish(req)
+ print 'yuea'
if __name__ == '__main__':
unittest_main()
--- a/web/views/ibreadcrumbs.py Tue Sep 29 15:10:13 2009 +0200
+++ b/web/views/ibreadcrumbs.py Tue Sep 29 15:10:56 2009 +0200
@@ -21,7 +21,7 @@
class BreadCrumbEntityVComponent(Component):
id = 'breadcrumbs'
- __select__ = one_line_rset() & implements(IBreadCrumbs)
+ __select__ = one_line_rset() & implements(IBreadCrumbs, accept_none=False)
property_defs = {
_('visible'): dict(type='Boolean', default=True,
@@ -70,7 +70,8 @@
class BreadCrumbETypeVComponent(BreadCrumbEntityVComponent):
- __select__ = two_lines_rset() & one_etype_rset() & implements(IBreadCrumbs)
+ __select__ = two_lines_rset() & one_etype_rset() & \
+ implements(IBreadCrumbs, accept_none=False)
def render_breadcrumbs(self, contextentity, path):
# XXX hack: only display etype name or first non entity path part