[views] fix ecsvexport selector
introduced by e48e5a597ccc
Fix the view and make web/test/test_views.py pass again.
--- a/web/test/unittest_viewselector.py Mon Oct 06 10:34:38 2014 +0200
+++ b/web/test/unittest_viewselector.py Mon Nov 24 14:43:28 2014 +0100
@@ -217,7 +217,6 @@
rset = req.execute('Any N, X WHERE X in_group Y, Y name N')
self.assertListEqual(self.pviews(req, rset),
[('csvexport', csvexport.CSVRsetView),
- ('ecsvexport', csvexport.CSVEntityView),
('jsonexport', json.JsonRsetView),
('rsetxml', xmlrss.XMLRsetView),
('table', tableview.RsetTableView),
--- a/web/views/csvexport.py Mon Oct 06 10:34:38 2014 +0200
+++ b/web/views/csvexport.py Mon Nov 24 14:43:28 2014 +0100
@@ -21,7 +21,7 @@
_ = unicode
from cubicweb.schema import display_name
-from cubicweb.predicates import any_rset
+from cubicweb.predicates import any_rset, empty_rset
from cubicweb.uilib import UnicodeCSVWriter
from cubicweb.view import EntityView, AnyRsetView
@@ -80,7 +80,7 @@
contents)
"""
__regid__ = 'ecsvexport'
- __select__ = any_rset()
+ __select__ = EntityView.__select__ | empty_rset()
title = _('csv export (entities)')
def call(self):