Fixed the getelementpropertieswithtype

This commit is contained in:
DingZQ
2025-03-02 10:59:21 +08:00
parent d14666fcff
commit 36e1692ccf
2 changed files with 4 additions and 2 deletions

View File

@@ -423,11 +423,13 @@ def get_link_properties(name: str, link_id: str) -> dict[str, Any]:
return api.get_valve(name, link_id)
# type can be 'node' or 'link'
def get_element_properties(name: str, type: str, element_id: str) -> dict[str, Any]:
def get_element_properties_with_type(name: str, type: str, element_id: str) -> dict[str, Any]:
if type == 'node':
return get_node_properties(name, element_id)
elif type == 'link':
return get_link_properties(name, element_id)
elif type == 'scada':
return get_scada_info(name, element_id)
else:
return {}