Skip to content
Snippets Groups Projects
Commit 61539925276d authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

possibletypes should be copied on copy for ColumnAlias as for Variable

parent dccea8c73933
No related branches found
No related tags found
No related merge requests found
......@@ -798,6 +798,11 @@
'references': set(),
}
def init_copy(self, old):
# should copy variable's possibletypes on copy
if not self.stinfo.get('possibletypes'):
self.stinfo['possibletypes'] = old.stinfo.get('possibletypes')
def as_string(self, encoding=None, kwargs=None):
"""return the tree as an encoded rql string"""
return self.name
......@@ -969,10 +974,6 @@
return ', '.join(sorted(vtype for vtype in vtypes))
return vtype
# Variable compatibility
def init_copy(self, old):
pass
def set_scope(self, scopenode):
pass
def get_scope(self):
......@@ -1027,11 +1028,6 @@
return self.stinfo['sqlscope']
sqlscope = property(get_sqlscope, set_sqlscope)
def init_copy(self, old):
# should copy variable's possibletypes on copy
if not self.stinfo.get('possibletypes'):
self.stinfo['possibletypes'] = old.stinfo.get('possibletypes')
def valuable_references(self):
"""return the number of "valuable" references :
references is in selection or in a non type (is) relations
......
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