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, }