Junction type is fixed enum value

This commit is contained in:
王琼钰
2022-09-15 14:06:31 +08:00
committed by coding.net
parent 7455fc25bb
commit b3bb99b18f

View File

@@ -53,7 +53,7 @@ def delete_junction(name: str, id: str) -> ChangeSet:
cur.execute(sql)
redo = sql.replace("'", '"')
undo = f'insert into _node (id, type) values ("{id}", "{type}");'
undo = f'insert into _node (id, type) values ("{id}", "JUNCTION");'
undo += f" insert into junctions (id, elevation, demand, pattern) values ('{id}', {elevation}, {demand}, {pattern});"
undo += f" insert into coordinates (node, coord) values ('{id}', '{coord}');"
add_operation(name, redo, undo)