linter issues

This commit is contained in:
matthewswspence 2024-10-07 12:35:19 -05:00
parent ac02e8cb81
commit 491ce93b14
No known key found for this signature in database
GPG key ID: FB458202A7852BA4
2 changed files with 7 additions and 3 deletions

View file

@ -224,13 +224,17 @@ class DomainFormBaseView(DomainBaseView, FormMixin):
emails = list(User.objects.filter(pk__in=manager_pks).values_list("email", flat=True)) emails = list(User.objects.filter(pk__in=manager_pks).values_list("email", flat=True))
try: try:
# Remove the current user so they aren't CC'ed, since they will be the "to_address" # Remove the current user so they aren't CC'ed, since they will be the "to_address"
emails.remove(self.request.user.email) emails.remove(self.request.user.email) # type: ignore
except ValueError: except ValueError:
pass pass
try: try:
send_templated_email( send_templated_email(
template, subject_template, to_address=self.request.user.email, context=context, cc_addresses=emails template,
subject_template,
to_address=self.request.user.email, # type: ignore
context=context,
cc_addresses=emails,
) )
except EmailSendingError: except EmailSendingError:
logger.warning( logger.warning(