fix: 组织统计中系统用户数量不对

pull/6442/head
xinwen 3 years ago committed by Jiangjie.Bai
parent bf885f94e4
commit 601a48071f

@ -54,8 +54,8 @@ class OrgResourceStatisticsCache(OrgRelatedCache):
assets_amount = IntegerField() assets_amount = IntegerField()
nodes_amount = IntegerField(queryset=Node.objects) nodes_amount = IntegerField(queryset=Node.objects)
admin_users_amount = IntegerField(queryset=AdminUser.objects) admin_users_amount = IntegerField(queryset=SystemUser.objects.filter(type=SystemUser.Type.admin))
system_users_amount = IntegerField(queryset=SystemUser.objects) system_users_amount = IntegerField(queryset=SystemUser.objects.filter(type=SystemUser.Type.common))
domains_amount = IntegerField(queryset=Domain.objects) domains_amount = IntegerField(queryset=Domain.objects)
gateways_amount = IntegerField(queryset=Gateway.objects) gateways_amount = IntegerField(queryset=Gateway.objects)

@ -55,8 +55,7 @@ class OrgResourceStatisticsRefreshUtil:
Application: ['applications_amount'], Application: ['applications_amount'],
Gateway: ['gateways_amount'], Gateway: ['gateways_amount'],
Domain: ['domains_amount'], Domain: ['domains_amount'],
SystemUser: ['system_users_amount'], SystemUser: ['system_users_amount', 'admin_users_amount'],
AdminUser: ['admin_users_amount'],
Node: ['nodes_amount'], Node: ['nodes_amount'],
Asset: ['assets_amount'], Asset: ['assets_amount'],
UserGroup: ['groups_amount'], UserGroup: ['groups_amount'],

Loading…
Cancel
Save