mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-31 01:33:56 +02:00
Merge remote-tracking branch 'origin/za/additional-data-transferred-domains' into za/additional-data-transferred-domains
This commit is contained in:
commit
6f918f4871
3 changed files with 6 additions and 5 deletions
|
@ -144,9 +144,10 @@ class Command(BaseCommand):
|
||||||
logger.info("Reading contacts data file %s", contacts_filename)
|
logger.info("Reading contacts data file %s", contacts_filename)
|
||||||
with open(contacts_filename, "r") as contacts_file:
|
with open(contacts_filename, "r") as contacts_file:
|
||||||
for row in csv.reader(contacts_file, delimiter=sep):
|
for row in csv.reader(contacts_file, delimiter=sep):
|
||||||
user_id = row[0]
|
if row != []:
|
||||||
user_email = row[6]
|
user_id = row[0]
|
||||||
user_emails_dictionary[user_id] = user_email
|
user_email = row[6]
|
||||||
|
user_emails_dictionary[user_id] = user_email
|
||||||
logger.info("Loaded emails for %d users", len(user_emails_dictionary))
|
logger.info("Loaded emails for %d users", len(user_emails_dictionary))
|
||||||
return user_emails_dictionary
|
return user_emails_dictionary
|
||||||
|
|
||||||
|
|
|
@ -672,7 +672,7 @@ class Command(BaseCommand):
|
||||||
existing_domain_info = DomainInformation.objects.filter(domain__name=target_domain_information.domain.name).exists()
|
existing_domain_info = DomainInformation.objects.filter(domain__name=target_domain_information.domain.name).exists()
|
||||||
if existing_domain_information_in_to_create is not None or existing_domain_info:
|
if existing_domain_information_in_to_create is not None or existing_domain_info:
|
||||||
debug_string = f"""{TerminalColors.YELLOW}
|
debug_string = f"""{TerminalColors.YELLOW}
|
||||||
Duplicate Detected: {domain_information_to_create}.
|
Duplicate Detected: {existing_domain_information_in_to_create}.
|
||||||
Cannot add duplicate Domain Information object
|
Cannot add duplicate Domain Information object
|
||||||
{TerminalColors.ENDC}"""
|
{TerminalColors.ENDC}"""
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -99,7 +99,7 @@ class DomainPermission(PermissionsLoginMixin):
|
||||||
requested_domain = None
|
requested_domain = None
|
||||||
if DomainInformation.objects.filter(id=pk).exists():
|
if DomainInformation.objects.filter(id=pk).exists():
|
||||||
requested_domain = DomainInformation.objects.get(id=pk)
|
requested_domain = DomainInformation.objects.get(id=pk)
|
||||||
|
|
||||||
domain_application = requested_domain.domain_application
|
domain_application = requested_domain.domain_application
|
||||||
if not hasattr(domain_application, "status"):
|
if not hasattr(domain_application, "status"):
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue