server/hook.py
changeset 7514 32081892850e
parent 7398 26695dd703d8
parent 7498 dc823b9ce74b
child 7638 cc7cde77184f
--- a/server/hook.py	Sat Jun 11 09:22:25 2011 +0200
+++ b/server/hook.py	Wed Jun 15 17:16:19 2011 +0200
@@ -928,6 +928,13 @@
     def _build_container(self):
         return self.containercls()
 
+    def union(self, data):
+        """only when container is a set"""
+        assert not self._processed, """Trying to add data to a closed operation.
+Iterating over operation data closed it and should be reserved to precommit /
+postcommit method of the operation."""
+        self._container |= data
+
     def add_data(self, data):
         assert not self._processed, """Trying to add data to a closed operation.
 Iterating over operation data closed it and should be reserved to precommit /