Commit eea4beb8 authored by Aurelien Lubert's avatar Aurelien Lubert
Browse files

fix(pyramid/predicates): avoid to show an error without a session connection

* Related to issue #335

--HG--
branch : 3.29
parent fae0b5f3459b
Pipeline #64086 passed with stages
in 40 minutes and 30 seconds
......@@ -57,6 +57,9 @@ class MatchIsEIDPredicate(object):
except ValueError:
return False
if request.cw_cnx is None:
return False
try:
request.cw_cnx.entity_from_eid(eid)
except UnknownEid:
......@@ -82,6 +85,9 @@ class MatchIsETypeAndEIDPredicate(object):
except ValueError:
return False
if request.cw_cnx is None:
return False
try:
entity = request.cw_cnx.entity_from_eid(eid)
except UnknownEid:
......@@ -112,6 +118,9 @@ class HasCWPermissionRoutePredicate:
if not eid:
return False
if request.cw_cnx is None:
return False
try:
entity = request.cw_cnx.entity_from_eid(eid)
except UnknownEid:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment