wip(semantic):数据模型语义化
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user