server/rqlannotation.py
branchstable
changeset 7734 59fea81647e5
parent 7707 936530f8d32c
child 8342 7a5271182ef0
--- a/server/rqlannotation.py	Wed Aug 03 13:28:06 2011 +0200
+++ b/server/rqlannotation.py	Thu Aug 04 12:50:48 2011 +0200
@@ -109,8 +109,9 @@
                         ostinfo = rhs.children[0].variable.stinfo
                     else:
                         ostinfo = lhs.variable.stinfo
-                    if not any(orel for orel in ostinfo['relations']
-                               if orel.optional and orel is not rel):
+                    if not (ostinfo.get('optcomparisons') or
+                            any(orel for orel in ostinfo['relations']
+                                if orel.optional and orel is not rel)):
                         break
             if rschema.final or (onlhs and rschema.inlined):
                 if rschema.type != 'has_text':