From c0c598ff15b82526d39a3838eaab78d976e29cf7 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 1 Jul 2026 14:59:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20permcode=20=E2=86=92=20path=20=E2=80=94?= =?UTF-8?q?=20=E6=9D=83=E9=99=90=E8=A1=A8=E5=88=97=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit permission 表的列名是 path,不是 permcode。 与 sage/load_path.py 保持一致。 --- scripts/load_path.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/load_path.py b/scripts/load_path.py index 26eacb2..07ba4d6 100644 --- a/scripts/load_path.py +++ b/scripts/load_path.py @@ -36,16 +36,16 @@ async def main(): cnt = 0 for path, role in paths: r = await sor.sqlExe( - 'select * from permission where permcode = ${permcode}$', - {'permcode': path} + 'select * from permission where path = ${path}$', + {'path': path} ) if len(r) == 0: await sor.sqlExe( - '''insert into permission (id, permcode, permname, permtype) - values (${id}$, ${permcode}$, ${permname}$, ${permtype}$)''', + '''insert into permission (id, path, permname, permtype) + values (${id}$, ${path}$, ${permname}$, ${permtype}$)''', { 'id': getID(), - 'permcode': path, + 'path': path, 'permname': path, 'permtype': role, }