use set_optional so one will get properly warned if erroneous value is given stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 23 Oct 2013 11:30:49 +0200
branchstable
changeset 723 e2d6622493d5
parent 722 ef50aa5ed8ce
child 726 816abac7f9ad
use set_optional so one will get properly warned if erroneous value is given
nodes.py
--- a/nodes.py	Wed Sep 11 12:57:23 2013 +0200
+++ b/nodes.py	Wed Oct 23 11:30:49 2013 +0200
@@ -524,7 +524,7 @@
         if root is not None and root.should_register_op and value != self.optional:
             from rql.undo import SetOptionalOperation
             root.undo_manager.add_operation(SetOptionalOperation(self, self.optional))
-        self.optional= value
+        self.set_optional(value)
 
 
 CMP_OPERATORS = frozenset(('=', '!=', '<', '<=', '>=', '>', 'ILIKE', 'LIKE', 'REGEXP'))