server/sources/rql2sql.py
changeset 8459 1931953226f2
parent 8457 69ad9a509bc3
child 8893 eebf286b405e
--- 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