Skip to content

Commit 2091e7c

Browse files
s-heppnerzrgt
andauthored
Update sdk/basyx/aas/adapter/json/json_serialization.py
Co-authored-by: Igor Garmaev <56840636+zrgt@users.noreply.github.com>
1 parent c5cefae commit 2091e7c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sdk/basyx/aas/adapter/json/json_serialization.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,11 @@ def _entity_to_json(cls, obj: model.Entity) -> Dict[str, object]:
642642
if obj.global_asset_id:
643643
data['globalAssetId'] = obj.global_asset_id
644644
if obj.specific_asset_id:
645+
if obj.entity_type is not None:
646+
data['entityType'] = _generic.ENTITY_TYPES[obj.entity_type]
647+
if obj.global_asset_id is not None:
648+
data['globalAssetId'] = obj.global_asset_id
649+
if obj.specific_asset_id is not None:
645650
data['specificAssetIds'] = list(obj.specific_asset_id)
646651
return data
647652

0 commit comments

Comments
 (0)