File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def filter_data_permission(request_user: GetUserInfoWithRelationDetail) -> Colum
7777 # 验证规则模型
7878 rule_model = data_rule .model
7979 if rule_model not in settings .DATA_PERMISSION_MODELS :
80- raise errors .NotFoundError (msg = '数据规则模型不存在 ' )
80+ raise errors .NotFoundError (msg = '数据规则可用模型不存在 ' )
8181 model_ins = dynamic_import_data_model (settings .DATA_PERMISSION_MODELS [rule_model ])
8282
8383 # 验证规则列
@@ -86,7 +86,7 @@ def filter_data_permission(request_user: GetUserInfoWithRelationDetail) -> Colum
8686 ]
8787 column = data_rule .column
8888 if column not in model_columns :
89- raise errors .NotFoundError (msg = '数据规则模型列不存在 ' )
89+ raise errors .NotFoundError (msg = '数据规则模可用型列不存在 ' )
9090
9191 # 构建过滤条件
9292 column_obj = getattr (model_ins , column )
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ class Settings(BaseSettings):
9090
9191 # 数据权限
9292 DATA_PERMISSION_MODELS : dict [str , str ] = { # 允许进行数据过滤的 SQLA 模型,它必须以模块字符串的方式定义
93- '部门 ' : 'backend.app.admin.model.Dept' ,
93+ 'Dept ' : 'backend.app.admin.model.Dept' ,
9494 }
9595 DATA_PERMISSION_COLUMN_EXCLUDE : list [str ] = [ # 排除允许进行数据过滤的 SQLA 模型列
9696 'id' ,
You can’t perform that action at this time.
0 commit comments