diff --git a/apps/orgs/caches.py b/apps/orgs/caches.py index cc4f71a2a..febbc64a9 100644 --- a/apps/orgs/caches.py +++ b/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) diff --git a/apps/orgs/signals_handler/cache.py b/apps/orgs/signals_handler/cache.py index 96d2a6186..734ad7af0 100644 --- a/apps/orgs/signals_handler/cache.py +++ b/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'],