Skip to content

Commit

Permalink
Merge pull request ckan#498 from NCAR/check-email-exists
Browse files Browse the repository at this point in the history
Check 'email' field existence before use
  • Loading branch information
amercader authored Apr 20, 2022
2 parents 7e683c7 + 7fb4f43 commit 8a9885a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/harvest/logic/action/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def harvest_get_notifications_recipients(context, data_dict):
member_details = p.toolkit.get_action(
'user_show')(context, {'id': member[0]})

if member_details['email']:
if member_details.get('email', None):
recipients.append({
'name': member_details['name'],
'email': member_details['email']
Expand Down

0 comments on commit 8a9885a

Please sign in to comment.