mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Bug with empty, self-referencing RefList columns.
Summary: If a table T contains a RefList:T showing RowId and there are any empty cells, the table can't be removed. Test Plan: Added new test Reviewers: dsagal Reviewed By: dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D4215
This commit is contained in:
@@ -1178,7 +1178,7 @@ class UserActions(object):
|
||||
# to strings containing comma-separated row IDs.
|
||||
# We need to get the values before changing the column type.
|
||||
table = self._engine.tables[table_id]
|
||||
new_values = [",".join(map(str, row)) for row in self._get_column_values(col)]
|
||||
new_values = [",".join(map(str, row or [])) for row in self._get_column_values(col)]
|
||||
self.ModifyColumn(table_id, col_id, dict(type="Text"))
|
||||
self.BulkUpdateRecord(table_id, list(table.row_ids), {col_id: new_values})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user