Clean tank
This commit is contained in:
@@ -7,6 +7,10 @@ from .s24_coordinates import *
|
||||
import utility
|
||||
|
||||
|
||||
OVERFLOW_YES = 'YES'
|
||||
OVERFLOW_NO = 'NO'
|
||||
|
||||
|
||||
def add_tank(name: str, id: str, x: float, y: float, elevation: float, init_level: float = 0, min_level: float = 0, max_level: float = 0, diameter: float = 0, min_vol: float = 0) -> ChangeSet:
|
||||
sql = f"insert into tanks (id, elevation, init_level, min_level, max_level, diameter, min_vol) values ('{id}', {elevation}, {init_level}, {min_level}, {max_level}, {diameter}, {min_vol});"
|
||||
undo_sql = f'delete from tanks where id = "{id}";'
|
||||
@@ -132,8 +136,6 @@ def set_tank_vol_curve(name: str, id: str, vol_curve: str) -> ChangeSet:
|
||||
|
||||
return _set_tank(name, id, 'vol_curve', 'str', vol_curve, True)
|
||||
|
||||
OVERFLOW_YES = 'YES'
|
||||
OVERFLOW_NO = 'NO'
|
||||
|
||||
def set_tank_overflow(name: str, id: str, overflow: str) -> ChangeSet:
|
||||
if overflow is not OVERFLOW_YES or overflow is not OVERFLOW_NO:
|
||||
|
||||
Reference in New Issue
Block a user