Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hendriksen-mark committed Jan 12, 2025
1 parent acca513 commit 3e610c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BridgeEmulator/flaskUI/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ def get_all_data() -> Dict[str, Any]:
for resource in saveResources:
for resource_id in bridgeConfig[resource]:
if resource_id != "0":
# Update the output with additional data from getV1Api
output[resource][resource_id].update(bridgeConfig[resource][resource_id].getV1Api().copy())
obj = bridgeConfig[resource][resource_id]
if hasattr(obj, 'getV1Api'):
# Update the output with additional data from getV1Api
output[resource][resource_id].update(obj.getV1Api().copy())
output["lightTypes"] = list(lightTypes.keys())
output["config"] = bridgeConfig["config"]
output["config"].update(buildConfig())
Expand Down

0 comments on commit 3e610c2

Please sign in to comment.