From 71533ba9deb92f1dc730fb779372b05e059111fc Mon Sep 17 00:00:00 2001 From: Wouter-Michiel Vierdag Date: Sat, 14 Dec 2024 18:30:23 +0100 Subject: [PATCH] fix tables --- src/spatialdata/_core/spatialdata.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spatialdata/_core/spatialdata.py b/src/spatialdata/_core/spatialdata.py index db9b91ab..c2c07564 100644 --- a/src/spatialdata/_core/spatialdata.py +++ b/src/spatialdata/_core/spatialdata.py @@ -1656,11 +1656,12 @@ def tables(self) -> Tables: return self._tables @tables.setter - def tables(self, shapes: dict[str, GeoDataFrame]) -> None: + def tables(self, tables: dict[str, AnnData]) -> None: """Set tables.""" self._shared_keys = self._shared_keys - set(self._tables.keys()) self._tables = Tables(shared_keys=self._shared_keys) - for k, v in shapes.items(): + for k, v in tables.items(): + TableModel().validate(v) self._tables[k] = v @property