[views] consider fallbackvid request parameter in ViewController stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 22 Oct 2009 11:02:50 +0200
branchstable
changeset 3783 4e38bbb0ba8c
parent 3782 c69fe7493b91
child 3784 2465ef6aef5f
[views] consider fallbackvid request parameter in ViewController
web/views/basecontrollers.py
--- a/web/views/basecontrollers.py	Thu Oct 22 11:01:50 2009 +0200
+++ b/web/views/basecontrollers.py	Thu Oct 22 11:02:50 2009 +0200
@@ -131,7 +131,7 @@
                 req.set_message(req._("You have no access to this view or it can not "
                                       "be used to display the current data."))
             self.warning("the view %s can not be applied to this query", vid)
-            vid = vid_from_rset(req, rset, self.schema)
+            vid = req.form.get('fallbackvid') or vid_from_rset(req, rset, self.schema)
             view = self.vreg['views'].select(vid, req, rset=rset)
         return view, rset