mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-16 22:44:11 +02:00
Linting
This commit is contained in:
parent
674fc9f7b3
commit
82fc67025b
3 changed files with 6 additions and 16 deletions
|
@ -367,15 +367,11 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
contact = None
|
contact = None
|
||||||
contacts = Contact.objects.filter(email=email)
|
contacts = Contact.objects.filter(email=email)
|
||||||
contact_count = contacts.count()
|
contact_count = contacts.count()
|
||||||
# Create a new one
|
# Create a new one
|
||||||
if contact_count == 0:
|
if contact_count == 0:
|
||||||
contact = Contact(
|
contact = Contact(
|
||||||
first_name=first_name,
|
first_name=first_name, middle_name=middle_name, last_name=last_name, email=email, phone=phone
|
||||||
middle_name=middle_name,
|
|
||||||
last_name=last_name,
|
|
||||||
email=email,
|
|
||||||
phone=phone
|
|
||||||
)
|
)
|
||||||
contact.save()
|
contact.save()
|
||||||
elif contact_count == 1:
|
elif contact_count == 1:
|
||||||
|
@ -427,7 +423,7 @@ class Command(BaseCommand):
|
||||||
"domain": domain,
|
"domain": domain,
|
||||||
"organization_name": transition_domain.organization_name,
|
"organization_name": transition_domain.organization_name,
|
||||||
"creator": default_creator,
|
"creator": default_creator,
|
||||||
"authorizing_official": contact
|
"authorizing_official": contact,
|
||||||
}
|
}
|
||||||
|
|
||||||
if valid_org_type:
|
if valid_org_type:
|
||||||
|
|
|
@ -287,10 +287,7 @@ class LoadExtraTransitionDomain:
|
||||||
|
|
||||||
def log_add_or_changed_values(self, file_type, values_to_check, domain_name):
|
def log_add_or_changed_values(self, file_type, values_to_check, domain_name):
|
||||||
for field_name, value in values_to_check:
|
for field_name, value in values_to_check:
|
||||||
str_exists = (
|
str_exists = value is not None and value.strip() != ""
|
||||||
value is not None
|
|
||||||
and value.strip() != ""
|
|
||||||
)
|
|
||||||
# Logs if we either added to this property,
|
# Logs if we either added to this property,
|
||||||
# or modified it.
|
# or modified it.
|
||||||
self._add_or_change_message(
|
self._add_or_change_message(
|
||||||
|
@ -331,11 +328,7 @@ class LoadExtraTransitionDomain:
|
||||||
("email", transition_domain.email),
|
("email", transition_domain.email),
|
||||||
("phone", transition_domain.phone),
|
("phone", transition_domain.phone),
|
||||||
]
|
]
|
||||||
self.log_add_or_changed_values(
|
self.log_add_or_changed_values(EnumFilenames.AUTHORITY_ADHOC, changed_fields, domain_name)
|
||||||
EnumFilenames.AUTHORITY_ADHOC,
|
|
||||||
changed_fields,
|
|
||||||
domain_name
|
|
||||||
)
|
|
||||||
|
|
||||||
return transition_domain
|
return transition_domain
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from .utility.time_stamped_model import TimeStampedModel
|
from .utility.time_stamped_model import TimeStampedModel
|
||||||
|
|
||||||
|
|
||||||
class StatusChoices(models.TextChoices):
|
class StatusChoices(models.TextChoices):
|
||||||
READY = "ready", "Ready"
|
READY = "ready", "Ready"
|
||||||
ON_HOLD = "on hold", "On Hold"
|
ON_HOLD = "on hold", "On Hold"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue