From f751a81a46617bdd7f7bfa1d6f0c78737a221e37 Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan Date: Mon, 3 Mar 2025 10:09:05 +0400 Subject: [PATCH] Fix item_context set_value tod --- src/superannotate/__init__.py | 2 +- src/superannotate/lib/infrastructure/annotation_adapter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/superannotate/__init__.py b/src/superannotate/__init__.py index 12e2e5379..2e4c077fa 100644 --- a/src/superannotate/__init__.py +++ b/src/superannotate/__init__.py @@ -3,7 +3,7 @@ import sys -__version__ = "4.4.32dev1" +__version__ = "4.4.32dev2" os.environ.update({"sa_version": __version__}) sys.path.append(os.path.split(os.path.realpath(__file__))[0]) diff --git a/src/superannotate/lib/infrastructure/annotation_adapter.py b/src/superannotate/lib/infrastructure/annotation_adapter.py index e0e28aec0..c333231cf 100644 --- a/src/superannotate/lib/infrastructure/annotation_adapter.py +++ b/src/superannotate/lib/infrastructure/annotation_adapter.py @@ -44,7 +44,7 @@ def get_component_value(self, component_id: str): return None def set_component_value(self, component_id: str, value: Any): - self.annotation["data"][component_id] = {"value": value} + self.annotation.setdefault("data", {}).setdefault(component_id, {})["value"] = value return self