Optimize scada sql

This commit is contained in:
WQY\qiong
2023-02-24 15:22:38 +08:00
parent aac46ac056
commit 0fb621112a
2 changed files with 2 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ def delete_scada_device(name: str, cs: ChangeSet) -> ChangeSet:
def clean_scada_device_cmd(name: str) -> ChangeSet:
cs = ChangeSet()
rows = read_all(name, 'select * from scada_device')
rows = read_all(name, 'select id from scada_device acs')
for row in rows:
cs.delete({ 'type': 'scada_device', 'id': row['id'] })