[rql2sql] remove debug print and fix bug introduced in 8469:69ad9a509bc3
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 09 Jul 2012 13:57:23 +0200
changeset 8459 1931953226f2
parent 8458 1c5f3c66ec53
child 8463 a964c40adbe3
child 8464 895e34d9ae0d
[rql2sql] remove debug print and fix bug introduced in 8469:69ad9a509bc3
server/sources/rql2sql.py
--- a/server/sources/rql2sql.py	Mon Jul 09 12:24:05 2012 +0200
+++ b/server/sources/rql2sql.py	Mon Jul 09 13:57:23 2012 +0200
@@ -1298,12 +1298,11 @@
                 principal = 1
             else:
                 principal = var.stinfo.get('principal')
-                print relation, principal
             # we've to return some sql if:
             # 1. visited relation is ored
             # 2. variable's principal is not this relation and not 1.
             if ored or (principal is not None and principal is not relation
-                        and not principal.ored()):
+                        and not getattr(principal, 'ored', lambda : 0)()):
                 # we have to generate unification expression
                 if principal is relation:
                     # take care if ored case and principal is the relation to