Skip to content

Commit 4314d43

Browse files
committed
Adopt changes with storing TileSpec in attrs
1 parent 4a89e1b commit 4314d43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wsidata/_model/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def tile_spec(self, key: str) -> TileSpec:
232232
The key of the tiles.
233233
234234
"""
235-
if self.TILE_SPEC_KEY in self:
235+
if self.TILE_SPEC_KEY in self.attrs:
236236
spec = self.attrs[self.TILE_SPEC_KEY][key]
237237
return TileSpec(**spec)
238238

wsidata/io/_elems.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def add_tiles(wsidata, key, xys, tile_spec: TileSpec, tissue_ids, **kws):
7272
cs = ShapesModel.parse(gdf, **kws)
7373
wsidata.shapes[key] = cs
7474

75-
if wsidata.TILE_SPEC_KEY in wsidata.tables:
75+
if wsidata.TILE_SPEC_KEY in wsidata.attrs:
7676
spec_data = wsidata.attrs[wsidata.TILE_SPEC_KEY]
7777
spec_data[key] = tile_spec.to_dict()
7878
else:

0 commit comments

Comments
 (0)