[view] ensure fallback_oid is specified before trying to select fallback view, else simply raise the exception stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 10 Jun 2010 12:53:21 +0200
branchstable
changeset 5709 5606c01d68b2
parent 5706 c2e8290bc7b7
child 5710 1c17e47df974
[view] ensure fallback_oid is specified before trying to select fallback view, else simply raise the exception
req.py
--- a/req.py	Thu Jun 10 10:15:26 2010 +0200
+++ b/req.py	Thu Jun 10 12:53:21 2010 +0200
@@ -307,6 +307,8 @@
         try:
             view =  self.vreg[__registry].select(__vid, self, rset=rset, **initargs)
         except RegistryException:
+            if __fallback_oid is None:
+                raise
             view =  self.vreg[__registry].select(__fallback_oid, self,
                                                  rset=rset, **initargs)
         return view.render(w=w, **kwargs)