diff --git a/api/s4_tanks.py b/api/s4_tanks.py index f21f66c..c4283a5 100644 --- a/api/s4_tanks.py +++ b/api/s4_tanks.py @@ -33,9 +33,8 @@ def delete_tank(name: str, id: str) -> ChangeSet: max_level = row['max_level'] diameter = row['diameter'] min_vol = row['min_vol'] - vol_curve = 'NULL' if row['vol_curve'] == None else row['vol_curve'] - vol_curve = f'"{vol_curve}"' if vol_curve != 'NULL' else vol_curve - overflow = 'NULL' if row['overflow'] == None else row['overflow'] + vol_curve = utility.decorate(row['vol_curve'], 'str', True) + overflow = utility.decorate(row['overflow'], 'str', True) sql += f"delete from tanks where id = '{id}';" undo_sql = f'insert into tanks (id, elevation, init_level, min_level, max_level, diameter, min_vol, vol_curve, overflow) values ("{id}", {elevation}, {init_level}, {min_level}, {max_level}, {diameter}, {min_vol}, {vol_curve}, {overflow});'