server/ssplanner.py
changeset 5726 c3b99606644d
parent 5557 1a534c596bff
child 5821 656c974961c4
equal deleted inserted replaced
5725:b5d595b66c35 5726:c3b99606644d
    19 
    19 
    20 """
    20 """
    21 from __future__ import with_statement
    21 from __future__ import with_statement
    22 
    22 
    23 __docformat__ = "restructuredtext en"
    23 __docformat__ = "restructuredtext en"
    24 
       
    25 from copy import copy
       
    26 
    24 
    27 from rql.stmts import Union, Select
    25 from rql.stmts import Union, Select
    28 from rql.nodes import Constant, Relation
    26 from rql.nodes import Constant, Relation
    29 
    27 
    30 from cubicweb import QueryError, typed_eid
    28 from cubicweb import QueryError, typed_eid
   477             result = self.execute_child()
   475             result = self.execute_child()
   478         else:
   476         else:
   479             result = [[]]
   477             result = [[]]
   480         for row in result:
   478         for row in result:
   481             # get a new entity definition for this row
   479             # get a new entity definition for this row
   482             edef = copy(base_edef)
   480             edef = base_edef.cw_copy()
   483             # complete this entity def using row values
   481             # complete this entity def using row values
   484             index = 0
   482             index = 0
   485             for rtype, rorder, value in self.rdefs:
   483             for rtype, rorder, value in self.rdefs:
   486                 if value is _FROM_SUBSTEP:
   484                 if value is _FROM_SUBSTEP:
   487                     value = row[index]
   485                     value = row[index]