Skip to content

Commit efea046

Browse files
Ornella33s-heppner
andauthored
Revert ServerAASFromJsonDecoder direct import (#550)
Previously, `provider.py` imported `ServerAASFromJsonDecoder` directly from `app.adapter`, which caused a circular import. Reverted the import to use the `app.adapter` module reference instead, accessing `adapter.ServerAASFromJsonDecoder` at the call site. Co-authored-by: s-heppner <iat@s-heppner.com>
1 parent 2b3716a commit efea046

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/app/model/provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from basyx.aas import model
66
from basyx.aas.model import provider as sdk_provider
77

8-
from app.adapter import ServerAASFromJsonDecoder
8+
from app import adapter
99
from app.model import descriptor
1010

1111
PathOrIO = Union[Path, IO]
@@ -66,7 +66,7 @@ def load_directory(directory: Union[Path, str]) -> DictDescriptorStore:
6666
if not file.is_file() or file.suffix.lower() != ".json":
6767
continue
6868
with open(file) as f:
69-
data = json.load(f, cls=ServerAASFromJsonDecoder)
69+
data = json.load(f, cls=adapter.ServerAASFromJsonDecoder)
7070
for item in data.get("assetAdministrationShellDescriptors", []):
7171
if isinstance(item, descriptor.AssetAdministrationShellDescriptor):
7272
try:

0 commit comments

Comments
 (0)