fix re-annotation pb: some stinfo keys were not properly reinitialized stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 28 Jul 2010 10:29:02 +0200
branchstable
changeset 570 2511dadae3b0
parent 568 283e1d29bff5
child 571 bcf24f8a29c0
fix re-annotation pb: some stinfo keys were not properly reinitialized which may cause pb later (at sql generation time for instance)
ChangeLog
nodes.py
--- a/ChangeLog	Mon Jun 21 11:53:01 2010 +0200
+++ b/ChangeLog	Wed Jul 28 10:29:02 2010 +0200
@@ -1,6 +1,10 @@
 ChangeLog for RQL
 =================
 
+	--
+    * fix re-annotation pb: some stinfo keys wasn't properly reinitialized
+      which may cause pb later (at sql generation time for instance)
+	
 2010-06-21  --  0.26.3
     * support for node from having in Select.remove
 
--- a/nodes.py	Mon Jun 21 11:53:01 2010 +0200
+++ b/nodes.py	Wed Jul 28 10:29:02 2010 +0200
@@ -19,8 +19,8 @@
 
 This module defines all the nodes we can find in a RQL Syntax tree, except
 root nodes, defined in the `stmts` module.
+"""
 
-"""
 __docformat__ = "restructuredtext en"
 
 from itertools import chain
@@ -861,6 +861,9 @@
             # constant node linked to an uid variable if any
             'constnode': None,
             })
+        # remove optional st infos
+        for key in ('optrelations', 'blocsimplification', 'ftirels'):
+            self.stinfo.pop(key, None)
 
     def add_optional_relation(self, relation):
         try: