fix - close oe unclose quota in dashboeard
This commit is contained in:
@@ -15,15 +15,16 @@ class QuotaDashboardService:
|
||||
|
||||
@staticmethod
|
||||
def get_dashboard(self, org: Organization, start_date: str = None, end_date: str = None,
|
||||
search_fields: list[str] = None):
|
||||
search_fields: list[str] = None, quota_is_closed: bool = False):
|
||||
orgs_child = get_all_org_child(org=org)
|
||||
orgs_child.append(org)
|
||||
|
||||
if org.type.key == 'ADM':
|
||||
org_quota_stats = OrganizationQuotaStats.objects.all()
|
||||
org_quota_stats = OrganizationQuotaStats.objects.filter(quota__is_closed=quota_is_closed, )
|
||||
else:
|
||||
org_quota_stats = OrganizationQuotaStats.objects.filter(
|
||||
organization__in=orgs_child
|
||||
organization__in=orgs_child,
|
||||
quota__is_closed=quota_is_closed,
|
||||
)
|
||||
|
||||
# filter queryset (transactions & items) by date
|
||||
|
||||
Reference in New Issue
Block a user