修复过滤后count数量

This commit is contained in:
mkg
2021-07-18 14:45:07 +08:00
parent fa49130c4f
commit 67d05c39f3
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ def table():
# orm查询
# 使用分页获取data需要.items
role = Role.query.filter(mf.get_filter(Role)).layui_paginate()
count = Role.query.count()
count = Role.query.filter(mf.get_filter(Role)).count()
# 返回api
return table_api(data=model_to_dicts(schema=RoleSchema, data=role.items), count=count)