Browse Source

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

pull/6442/head
xinwen 3 years ago committed by Jiangjie.Bai
parent
commit
601a48071f
  1. 4
      apps/orgs/caches.py
  2. 3
      apps/orgs/signals_handler/cache.py

4
apps/orgs/caches.py

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

3
apps/orgs/signals_handler/cache.py

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

Loading…
Cancel
Save