web/views/basecontrollers.py
changeset 3659 993997b4b41d
parent 3629 559cad62c786
child 3777 3ef8cdb5fb1c
--- a/web/views/basecontrollers.py	Tue Oct 13 16:00:09 2009 +0200
+++ b/web/views/basecontrollers.py	Tue Oct 13 18:20:05 2009 +0200
@@ -116,13 +116,13 @@
             except Exception, ex:
                 self.exception('while handling __method')
                 req.set_message(req._("error while handling __method: %s") % req._(ex))
-        vid = req.form.get('vid') or vid_from_rset(req, rset, self._cw.schema)
+        vid = req.form.get('vid') or vid_from_rset(req, rset, self._cw.vreg.schema)
         try:
             view = self._cw.vreg['views'].select(vid, req, rset=rset)
         except ObjectNotFound:
             self.warning("the view %s could not be found", vid)
             req.set_message(req._("The view %s could not be found") % vid)
-            vid = vid_from_rset(req, rset, self._cw.schema)
+            vid = vid_from_rset(req, rset, self._cw.vreg.schema)
             view = self._cw.vreg['views'].select(vid, req, rset=rset)
         except NoSelectableObject:
             if rset:
@@ -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._cw.schema)
+            vid = vid_from_rset(req, rset, self._cw.vreg.schema)
             view = self._cw.vreg['views'].select(vid, req, rset=rset)
         return view, rset
 
@@ -345,7 +345,7 @@
             rset = self._exec(rql)
         else:
             rset = None
-        vid = req.form.get('vid') or vid_from_rset(req, rset, self._cw.schema)
+        vid = req.form.get('vid') or vid_from_rset(req, rset, self._cw.vreg.schema)
         try:
             view = self._cw.vreg['views'].select(vid, req, rset=rset)
         except NoSelectableObject: