Merge pull request #2703 from cisagov/za/fix-additional-allowed-emails-bug

Fix bug with fixtures on `additional_allowed_emails` adding strings instead of AllowedEmail objects
This commit is contained in:
zandercymatics 2024-09-03 14:08:00 -06:00 committed by GitHub
commit bf2079a344
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -295,7 +295,7 @@ class UserFixture:
logger.warning(f"Could not add email to whitelist for {first_name} {last_name}.")
# Load additional emails
allowed_emails.extend(additional_emails)
allowed_emails.extend([AllowedEmail(email=email) for email in additional_emails])
if allowed_emails:
AllowedEmail.objects.bulk_create(allowed_emails)

View file

@ -1,4 +1,4 @@
<p>This table is an email whitelist for <strong>non-production</strong> environments.</p>
<p>This table is an email allow list for <strong>non-production</strong> environments.</p>
<p>
If an email is sent out and the email does not exist within this table (or is not a subset of it),
then no email will be sent.