server/session.py
changeset 4767 74b8e39d4825
parent 4759 af2e6c377c71
child 4834 b718626a0e60
equal deleted inserted replaced
4766:162b2b127b15 4767:74b8e39d4825
   583             return self._threaddata.pending_operations
   583             return self._threaddata.pending_operations
   584 
   584 
   585     def add_operation(self, operation, index=None):
   585     def add_operation(self, operation, index=None):
   586         """add an observer"""
   586         """add an observer"""
   587         assert self.commit_state != 'commit'
   587         assert self.commit_state != 'commit'
   588         if index is not None:
   588         if index is None:
       
   589             self.pending_operations.append(operation)
       
   590         else:
   589             self.pending_operations.insert(index, operation)
   591             self.pending_operations.insert(index, operation)
   590         else:
       
   591             self.pending_operations.append(operation)
       
   592 
   592 
   593     # querier helpers #########################################################
   593     # querier helpers #########################################################
   594 
   594 
   595     @property
   595     @property
   596     def rql_rewriter(self):
   596     def rql_rewriter(self):