Closed FuhuXia closed 2 years ago
This change add sysadmin to the recipient only if the sysadmin account has a non-empty email address.
This fixes the following issue: CKAN core creates a sysadmin account using site_id as name, None as email in code https://github.com/ckan/ckan/blob/master/ckan/logic/action/get.py#L2428-L2433, therefore we were sending a None as email address down the line and eventually the mailer will generate an error.
site_id
None
python/lib/python3.7/smtplib.py", line 153, in quoteaddr if addrstring.strip().startswith('<'): AttributeError: 'NoneType' object has no attribute 'strip'
This change add sysadmin to the recipient only if the sysadmin account has a non-empty email address.
This fixes the following issue: CKAN core creates a sysadmin account using
site_id
as name,None
as email in code https://github.com/ckan/ckan/blob/master/ckan/logic/action/get.py#L2428-L2433, therefore we were sending aNone
as email address down the line and eventually the mailer will generate an error.