wip(semantic):数据模型语义化

This commit is contained in:
zhengxinonly
2021-09-06 02:17:36 +08:00
parent 27f5d78c35
commit 00053da117
31 changed files with 189 additions and 183 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
from flask import render_template
from applications.common.utils.rights import authorize
from applications.models import Power
from applications.models import RightsPower
from applications.view import index_bp
@@ -14,7 +14,7 @@ def rights_index():
@index_bp.get('/rights/power/<int:power_id>')
@authorize("admin:power:edit", log=True)
def get(power_id):
power = Power.query.filter_by(id=power_id).first()
power = RightsPower.query.filter_by(id=power_id).first()
icon = str(power.icon).split()
if len(icon) == 2:
icon = icon[1]