Commit 6ffe38b1 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
parent 65565105206c
Pipeline #64449 passed with stage
in 15 minutes and 23 seconds
......@@ -59,6 +59,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:
......@@ -85,6 +88,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:
......@@ -115,6 +121,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