paperwork: Remove suffixes from names in shopleads mailing list
Mailman3 doesn't have display names per list anymore, so this is somewhat confusing
This commit is contained in:
parent
83da93b712
commit
43f992e2c3
@ -273,7 +273,7 @@ class Member(BaseModel):
|
||||
if hasattr(user, "ldap_user"):
|
||||
return cls.objects.get(uid=user.ldap_user.attrs["employeeNumber"][0])
|
||||
|
||||
def sanitized_mailbox(self, name_ext: str = "", use_volunteer=False) -> str:
|
||||
def sanitized_mailbox(self, use_volunteer=False) -> str:
|
||||
if use_volunteer and self.volunteer_email:
|
||||
email = self.volunteer_email
|
||||
elif self.email:
|
||||
@ -285,7 +285,7 @@ class Member(BaseModel):
|
||||
return email
|
||||
|
||||
return django.core.mail.message.sanitize_address(
|
||||
(self.account_name + name_ext, email), settings.DEFAULT_CHARSET
|
||||
(self.account_name, email), settings.DEFAULT_CHARSET
|
||||
)
|
||||
|
||||
|
||||
|
@ -92,10 +92,7 @@ class DepartmentViewSet(viewsets.ModelViewSet):
|
||||
# Add members to the Shop Leads mailing list, but don't configure it
|
||||
lists["ShopLeads"] = {
|
||||
"members": {
|
||||
shoplead.sanitized_mailbox(
|
||||
f" - {'/'.join(department.name for department in departments)}",
|
||||
use_volunteer=True,
|
||||
)
|
||||
shoplead.sanitized_mailbox(use_volunteer=True)
|
||||
for shoplead, departments in shopleads.items()
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user