Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add recipient only if there is email #510

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

FuhuXia
Copy link
Contributor

@FuhuXia FuhuXia commented Aug 12, 2022

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.

python/lib/python3.7/smtplib.py", line 153, in quoteaddr                                        
if addrstring.strip().startswith('<'):                                                                                  
AttributeError: 'NoneType' object has no attribute 'strip' 

@amercader amercader merged commit 03b5c93 into ckan:master Aug 16, 2022
LittleRed945 pushed a commit to LittleRed945/ckanext-harvest that referenced this pull request Sep 22, 2022
add recipient only if there is email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants