--- a/server/session.py Wed Mar 03 18:30:25 2010 +0100
+++ b/server/session.py Wed Mar 03 18:31:08 2010 +0100
@@ -585,10 +585,10 @@
def add_operation(self, operation, index=None):
"""add an observer"""
assert self.commit_state != 'commit'
- if index is not None:
+ if index is None:
+ self.pending_operations.append(operation)
+ else:
self.pending_operations.insert(index, operation)
- else:
- self.pending_operations.append(operation)
# querier helpers #########################################################