_id和id混乱导致的role编辑bug

This commit is contained in:
mkg
2021-07-19 15:55:32 +08:00
parent 34a1066cd0
commit f3cfdcf580
+2 -2
View File
@@ -125,9 +125,9 @@ def save_role_power():
# 角色编辑
@admin_role.get('/edit/<int:_id>')
@admin_role.get('/edit/<int:id>')
@authorize("admin:role:edit", log=True)
def edit(_id):
def edit(id):
r = get_one_by_id(model=Role, id=id)
return render_template('admin/role/edit.html', role=r)