Skip to content
Snippets Groups Projects
Commit af5c1c50b8da authored by Sylvain Thenault's avatar Sylvain Thenault
Browse files

since Not is a scope now, it should (seems to) be editable

parent 581690fba7f7
No related branches found
No related tags found
No related merge requests found
...@@ -259,6 +259,15 @@ ...@@ -259,6 +259,15 @@
def neged(self, _fromnode=None): def neged(self, _fromnode=None):
return self return self
def parent_scope_property(attr):
def _get_parent_attr(self, attr=attr):
return getattr(self.parent.scope, attr)
return property(_get_parent_attr)
# editable compatibility
for method in ('remove_node', 'add_restriction', 'add_constant_restriction',
'add_relation', 'add_eid_restriction', 'add_type_restriction'):
setattr(Not, method, parent_scope_property(method))
class Exists(EditableMixIn, BaseNode): class Exists(EditableMixIn, BaseNode):
"""EXISTS sub query""" """EXISTS sub query"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment