cubicweb/server/rqlannotation.py
branch3.26
changeset 12432 2fcb53ee5178
parent 11770 22b854d3e8b2
child 12509 db81a99e9dd1
equal deleted inserted replaced
12431:a570191d67b0 12432:2fcb53ee5178
    98                 elif len(stinfo['relations']) == 2:
    98                 elif len(stinfo['relations']) == 2:
    99                     if onlhs:
    99                     if onlhs:
   100                         ostinfo = rhs.children[0].variable.stinfo
   100                         ostinfo = rhs.children[0].variable.stinfo
   101                     else:
   101                     else:
   102                         ostinfo = lhs.variable.stinfo
   102                         ostinfo = lhs.variable.stinfo
   103                     if not (ostinfo.get('optcomparisons') or
   103                     if not (ostinfo.get('optcomparisons')
   104                             any(orel for orel in ostinfo['relations']
   104                             or any(orel for orel in ostinfo['relations']
   105                                 if orel.optional and orel is not rel)):
   105                                    if orel.optional and orel is not rel)):
   106                         break
   106                         break
   107             if rschema.final or (onlhs and rschema.inlined):
   107             if rschema.final or (onlhs and rschema.inlined):
   108                 if rschema.type != 'has_text':
   108                 if rschema.type != 'has_text':
   109                     # need join anyway if the variable appears in a final or
   109                     # need join anyway if the variable appears in a final or
   110                     # inlined relation
   110                     # inlined relation