Skip to content

Commit f203bed

Browse files
committed
Fix syntax
1 parent 138ab61 commit f203bed

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,6 @@ def _entity_to_json(cls, obj: model.Entity) -> Dict[str, object]:
637637
data = cls._abstract_classes_to_json(obj)
638638
if not cls.stripped and obj.statement:
639639
data['statements'] = list(obj.statement)
640-
if obj.entity_type:
641-
data['entityType'] = _generic.ENTITY_TYPES[obj.entity_type]
642-
if obj.global_asset_id:
643-
data['globalAssetId'] = obj.global_asset_id
644-
if obj.specific_asset_id:
645640
if obj.entity_type is not None:
646641
data['entityType'] = _generic.ENTITY_TYPES[obj.entity_type]
647642
if obj.global_asset_id is not None:

sdk/basyx/aas/model/submodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ def _generate_id_short(self, new: _SE) -> None:
736736
self._uuid_seq += 1
737737

738738
def _unset_id_short(self, old: _SE) -> None:
739-
if old.id_short.startswith("generated_submodel_list_hack_"):
739+
if old.id_short is not None and old.id_short.startswith("generated_submodel_list_hack_"):
740740
old.id_short = None
741741

742742
def _check_constraints(self, new: _SE, existing: Iterable[_SE]) -> None:

0 commit comments

Comments
 (0)