Skip to content

Commit

Permalink
Check field existence before use
Browse files Browse the repository at this point in the history
  • Loading branch information
bonnland committed Apr 14, 2022
1 parent 83e42c6 commit 7fb4f43
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 7fb4f43

Please sign in to comment.