Skip to content

Commit 4460fbb

Browse files
committed
table.attributes are always referenced in transformations
1 parent d7634aa commit 4460fbb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Orange/data/table.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,9 @@ def from_table(cls, domain, source, row_indices=...):
835835
self.W = source.W[row_indices]
836836
self.name = getattr(source, 'name', '')
837837
self.ids = source.ids[row_indices]
838+
self.attributes = getattr(source, 'attributes', {})
838839
if new_cache: # only deepcopy attributes for the outermost transformation
839-
self.attributes = deepcopy(getattr(source, 'attributes', {}))
840+
self.attributes = deepcopy(self.attributes)
840841
_idcache_save(_thread_local.conversion_cache, (domain, source), self)
841842
return self
842843
finally:
@@ -895,8 +896,9 @@ def from_table_rows(cls, source, row_indices):
895896
self.W = source.W[row_indices]
896897
self.name = getattr(source, 'name', '')
897898
self.ids = source.ids[row_indices]
899+
self.attributes = getattr(source, 'attributes', {})
898900
if is_outermost_transformation:
899-
self.attributes = deepcopy(getattr(source, 'attributes', {}))
901+
self.attributes = deepcopy(self.attributes)
900902
return self
901903

902904
@classmethod

0 commit comments

Comments
 (0)