Commit 564447f8 by tinywell

设备数量结果判断修正

parent 74300011
...@@ -105,7 +105,7 @@ class MonitorPointTool(BaseTool): ...@@ -105,7 +105,7 @@ class MonitorPointTool(BaseTool):
try: try:
response = self.client.query_device_and_sensor(code, start_time, end_time, device_type) response = self.client.query_device_and_sensor(code, start_time, end_time, device_type)
self.logger.debug(f"API响应: {response}") self.logger.debug(f"API响应: {response}")
if response.type != 1 or len(response.resultdata) == 0: if response.type != 1 or len(response.resultdata) == 0 or len(response.resultdata.get("DeviceList")) == 0:
error_msg = f"查询失败: {response.message},请检查是否有相关数据权限" error_msg = f"查询失败: {response.message},请检查是否有相关数据权限"
self.logger.warning(error_msg) self.logger.warning(error_msg)
return { return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment