Skip to content

Commit

Permalink
Fix KeyError when globalAssetId is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
fvolz authored Sep 27, 2024
1 parent 53216a9 commit 011ee84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend-flask/InterfaceSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def asset_already_existing(self, assetId):
def descriptor_already_exist(self, descriptors, assetId):
descriptor = {}
for _descriptor in descriptors:
if assetId == _descriptor["globalAssetId"]:
if assetId == _descriptor.get("globalAssetId", ""):
return _descriptor
return descriptor

Expand Down Expand Up @@ -281,4 +281,4 @@ def push_payload_to_submodelElement(self, submodel, name, payload):
return submodel

return submodel


0 comments on commit 011ee84

Please sign in to comment.