mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-16 22:44:11 +02:00
Update csv_export.py
This commit is contained in:
parent
ae6ecabfc0
commit
e915937510
1 changed files with 17 additions and 2 deletions
|
@ -892,6 +892,10 @@ class DomainGrowth(DomainExport):
|
||||||
"""
|
"""
|
||||||
Get a Q object of filter conditions to filter when building queryset.
|
Get a Q object of filter conditions to filter when building queryset.
|
||||||
"""
|
"""
|
||||||
|
if not start_date or not end_date:
|
||||||
|
# Return nothing
|
||||||
|
return Q(id__in=[])
|
||||||
|
|
||||||
filter_ready = Q(
|
filter_ready = Q(
|
||||||
domain__state__in=[Domain.State.READY],
|
domain__state__in=[Domain.State.READY],
|
||||||
domain__first_ready__gte=start_date,
|
domain__first_ready__gte=start_date,
|
||||||
|
@ -960,10 +964,14 @@ class DomainManaged(DomainExport):
|
||||||
return ["permissions"]
|
return ["permissions"]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_filter_conditions(cls, start_date=None, end_date=None, **kwargs):
|
def get_filter_conditions(cls, end_date=None, **kwargs):
|
||||||
"""
|
"""
|
||||||
Get a Q object of filter conditions to filter when building queryset.
|
Get a Q object of filter conditions to filter when building queryset.
|
||||||
"""
|
"""
|
||||||
|
if not end_date:
|
||||||
|
# Return nothing
|
||||||
|
return Q(id__in=[])
|
||||||
|
|
||||||
end_date_formatted = format_end_date(end_date)
|
end_date_formatted = format_end_date(end_date)
|
||||||
return Q(
|
return Q(
|
||||||
domain__permissions__isnull=False,
|
domain__permissions__isnull=False,
|
||||||
|
@ -1095,10 +1103,14 @@ class DomainUnmanaged(DomainExport):
|
||||||
return ["permissions"]
|
return ["permissions"]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_filter_conditions(cls, start_date=None, end_date=None, **kwargs):
|
def get_filter_conditions(cls, end_date=None, **kwargs):
|
||||||
"""
|
"""
|
||||||
Get a Q object of filter conditions to filter when building queryset.
|
Get a Q object of filter conditions to filter when building queryset.
|
||||||
"""
|
"""
|
||||||
|
if not end_date:
|
||||||
|
# Return nothing
|
||||||
|
return Q(id__in=[])
|
||||||
|
|
||||||
end_date_formatted = format_end_date(end_date)
|
end_date_formatted = format_end_date(end_date)
|
||||||
return Q(
|
return Q(
|
||||||
domain__permissions__isnull=True,
|
domain__permissions__isnull=True,
|
||||||
|
@ -1331,6 +1343,9 @@ class DomainRequestGrowth(DomainRequestExport):
|
||||||
"""
|
"""
|
||||||
Get a Q object of filter conditions to filter when building queryset.
|
Get a Q object of filter conditions to filter when building queryset.
|
||||||
"""
|
"""
|
||||||
|
if not start_date or not end_date:
|
||||||
|
# Return nothing
|
||||||
|
return Q(id__in=[])
|
||||||
|
|
||||||
start_date_formatted = format_start_date(start_date)
|
start_date_formatted = format_start_date(start_date)
|
||||||
end_date_formatted = format_end_date(end_date)
|
end_date_formatted = format_end_date(end_date)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue