Fix module import

This commit is contained in:
wqy
2022-09-17 18:42:12 +08:00
parent 47e0b48025
commit 8cf5895f1d
6 changed files with 23 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
from psycopg.rows import Row
from .s0_base import *
from .change_set import ChangeSet
import utility
from .utility import *
def add_pump(name: str, id: str, node1: str, node2: str) -> ChangeSet:
@@ -16,7 +16,7 @@ def add_pump(name: str, id: str, node1: str, node2: str) -> ChangeSet:
def _get_pump(name: str, id: str) -> Row | None:
return utility.query(name, f"select node1, node2 from pumps where id = '{id}'")
return query(name, f"select node1, node2 from pumps where id = '{id}'")
def delete_pump(name: str, id: str) -> ChangeSet:
@@ -59,7 +59,7 @@ def _set_pump(name: str, id: str, key: str, key_type: str, value: str, optional:
if row == None:
return ChangeSet()
return utility.update(name, PUMP, 'pumps', 'id', id, key, key_type, row[key], value, optional)
return update(name, PUMP, 'pumps', 'id', id, key, key_type, row[key], value, optional)
def set_pump_node1(name: str, id: str, node1: str) -> ChangeSet: