Skip to content

Commit

Permalink
Don't override col_cls in DynamicTable.add_column
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Apr 4, 2024
1 parent d85d0cb commit a5f33c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hdmf/common/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,11 +821,13 @@ def add_column(self, **kwargs): # noqa: C901
raise ValueError("column '%s' cannot be both a table region "
"and come from an enumerable set of elements" % name)
if table is not False:
col_cls = DynamicTableRegion
if col_cls is None:
col_cls = DynamicTableRegion
if isinstance(table, DynamicTable):
ckwargs['table'] = table
if enum is not False:
col_cls = EnumData
if col_cls is None:
col_cls = EnumData
if isinstance(enum, (list, tuple, np.ndarray, VectorData)):
ckwargs['elements'] = enum

Expand Down

0 comments on commit a5f33c2

Please sign in to comment.