-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rectify mixed types in gathering mailtrigger recipients (#7932)
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,16 +138,16 @@ def gather_group_steering_group(self,**kwargs): | |
def gather_stream_managers(self, **kwargs): | ||
addrs = [] | ||
manager_map = dict( | ||
ise = '<[email protected]>', | ||
irtf = '<[email protected]>', | ||
ietf = '<[email protected]>', | ||
iab = '<[email protected]>', | ||
ise = ['<[email protected]>'], | ||
irtf = ['<[email protected]>'], | ||
ietf = ['<[email protected]>'], | ||
iab = ['<[email protected]>'], | ||
editorial = Role.objects.filter(group__acronym="rsab",name_id="chair").values_list("email__address", flat=True), | ||
) | ||
if 'streams' in kwargs: | ||
for stream in kwargs['streams']: | ||
if stream in manager_map: | ||
addrs.append(manager_map[stream]) | ||
addrs.extend(manager_map[stream]) | ||
return addrs | ||
|
||
def gather_doc_stream_manager(self, **kwargs): | ||
|
@@ -234,7 +234,7 @@ def gather_submission_submitter(self, **kwargs): | |
try: | ||
submitter = Alias.objects.get(name=submission.submitter).person | ||
if submitter and submitter.email(): | ||
addrs.extend(["%s <%s>" % (submitter.name, submitter.email().address)]) | ||
addrs.append(f"{submitter.name} <{submitter.email().address}>") | ||
except (Alias.DoesNotExist, Alias.MultipleObjectsReturned): | ||
pass | ||
return addrs | ||
|