Accept Merge Request #24: (api -> master)

Merge Request: Format

Created By: @王琼钰
Accepted By: @王琼钰
URL: https://tjwater.coding.net/p/tjwatercloud/d/TJWaterServer/git/merge/24
This commit is contained in:
王琼钰
2022-09-15 23:16:40 +08:00
2 changed files with 2 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ 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 coordinates (node, coord) values ("{id}", "{coord}");'
add_operation(name, redo, undo)
change = ChangeSet()

View File

@@ -77,6 +77,7 @@ def commit_transaction(name: str) -> None:
def abort_transaction(name: str) -> None:
return api.abort_transaction(name)
############################################################
# type
############################################################