diff --git a/apps/product/models.py b/apps/product/models.py index 8fd86cd..8e47dfc 100644 --- a/apps/product/models.py +++ b/apps/product/models.py @@ -469,12 +469,21 @@ class Quota(BaseModel): """ get stats of quota from org quota stat model """ + stat = OrganizationQuotaStats.objects.filter( quota=self, organization=org ) - if not stat.exists(): + if not stat.exists() and org.type.key == 'ADM': + # if org is admin just see the quota was created by registerer org + org = self.registerer_organization + stat = OrganizationQuotaStats.objects.filter( + quota=self, + organization=org + ) + + elif not stat.exists(): # get childs of organization org_childs = get_all_org_child(org) # noqa