fix: permcode → path — 权限表列名修正
permission 表的列名是 path,不是 permcode。 与 sage/load_path.py 保持一致。
This commit is contained in:
parent
5ebe83207d
commit
c0c598ff15
@ -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,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user