Fix module import
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from psycopg.rows import Row
|
||||
from .s0_base import *
|
||||
from .change_set import ChangeSet
|
||||
import utility
|
||||
from .utility import *
|
||||
|
||||
|
||||
PIPE_STATUS_OPEN = 'open'
|
||||
@@ -21,7 +21,7 @@ def add_pipe(name: str, id: str, node1: str, node2: str, length: float = 0, diam
|
||||
|
||||
|
||||
def _get_pipe(name: str, id: str) -> Row | None:
|
||||
return utility.query(name, f"select node1, node2, length, diameter, roughness, minor_loss, status from pipes where id = '{id}'")
|
||||
return query(name, f"select node1, node2, length, diameter, roughness, minor_loss, status from pipes where id = '{id}'")
|
||||
|
||||
|
||||
def delete_pipe(name: str, id: str) -> ChangeSet:
|
||||
@@ -83,7 +83,7 @@ def _set_pipe(name: str, id: str, key: str, key_type: str, value: str, optional:
|
||||
if row == None:
|
||||
return ChangeSet()
|
||||
|
||||
return utility.update(name, PIPE, 'pipes', 'id', id, key, key_type, row[key], value, optional)
|
||||
return update(name, PIPE, 'pipes', 'id', id, key, key_type, row[key], value, optional)
|
||||
|
||||
|
||||
def set_pipe_node1(name: str, id: str, node1: str) -> ChangeSet:
|
||||
|
||||
Reference in New Issue
Block a user