From b3bb99b18f79902a526246228d32b30ddcb947d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=90=BC=E9=92=B0?= Date: Thu, 15 Sep 2022 14:06:31 +0800 Subject: [PATCH] Junction type is fixed enum value --- api/s2_junctions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/s2_junctions.py b/api/s2_junctions.py index 41a4398..b639d62 100644 --- a/api/s2_junctions.py +++ b/api/s2_junctions.py @@ -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)