mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 20:48:40 +02:00
Exclude approved
This commit is contained in:
parent
87b08e3fa0
commit
8e7ffab8b2
1 changed files with 6 additions and 2 deletions
|
@ -18,8 +18,12 @@ class Command(BaseCommand, PopulateScriptTemplate):
|
|||
self.mass_update_records(DomainRequest, filter_conditions, fields_to_update)
|
||||
|
||||
def custom_filter(self, records):
|
||||
"""Exclude domain requests that have the same org name as the portfolio"""
|
||||
return records.exclude(organization_name__iexact=F("portfolio__organization_name"))
|
||||
"""Exclude domain requests that have the same org name as the portfolio.
|
||||
Also excludes approved."""
|
||||
return records.exclude(
|
||||
organization_name__iexact=F("portfolio__organization_name"),
|
||||
status=DomainRequest.DomainRequestStatus.APPROVED,
|
||||
)
|
||||
|
||||
def update_record(self, record: DomainRequest):
|
||||
"""Adds data to requested_suborganization, suborganization_city, and suborganization_state_territory."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue