(core) Fix a bug that occurs after remaing a table containing a RefList column.

Summary:
This can happen after "Detach" is used on a summary table.
Includes a unittest reproducing the problem case.

Test Plan: Included unittest fails without the one-line tweak.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2672
This commit is contained in:
Dmitry S
2020-11-25 02:35:44 -05:00
parent 4539521dff
commit 5172cae1c2
2 changed files with 103 additions and 1 deletions

View File

@@ -330,7 +330,7 @@ class BaseReferenceColumn(BaseColumn):
# self._data may include values for non-existent rows; it works here because those values are
# falsy, which makes them ignored by self._update_references).
for row_id, value in enumerate(self._data):
if isinstance(value, int):
if self.type_obj.is_right_type(value):
self._update_references(row_id, None, value)
def sample_value(self):