Fix delete_junction undo sql

This commit is contained in:
王琼钰
2022-09-15 14:10:26 +08:00
committed by coding.net
parent b3bb99b18f
commit bb859bb946

View File

@@ -54,8 +54,8 @@ def delete_junction(name: str, id: str) -> ChangeSet:
redo = sql.replace("'", '"')
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}');"
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)
change = ChangeSet()