Merge remote-tracking branch 'origin/za/additional-data-transferred-domains' into za/additional-data-transferred-domains

This commit is contained in:
CocoByte 2023-11-03 14:29:21 -05:00
commit 6f918f4871
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
3 changed files with 6 additions and 5 deletions

View file

@ -144,9 +144,10 @@ class Command(BaseCommand):
logger.info("Reading contacts data file %s", contacts_filename)
with open(contacts_filename, "r") as contacts_file:
for row in csv.reader(contacts_file, delimiter=sep):
user_id = row[0]
user_email = row[6]
user_emails_dictionary[user_id] = user_email
if row != []:
user_id = row[0]
user_email = row[6]
user_emails_dictionary[user_id] = user_email
logger.info("Loaded emails for %d users", len(user_emails_dictionary))
return user_emails_dictionary

View file

@ -672,7 +672,7 @@ class Command(BaseCommand):
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:
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
{TerminalColors.ENDC}"""
else: