make it possible to get email address
This commit is contained in:
parent
b79d68c477
commit
79a5a45ba0
|
@ -13,4 +13,6 @@ development.ini
|
|||
node_modules
|
||||
*.project
|
||||
.eggs
|
||||
.vscode/
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
|
|
|
@ -450,9 +450,13 @@ def harvest_get_notifications_recipients(context, data_dict):
|
|||
'capacity': 'admin'
|
||||
})
|
||||
|
||||
# Get access to email address by running action as admin user
|
||||
context['user'] = 'admin'
|
||||
for member in members:
|
||||
member_details = p.toolkit.get_action(
|
||||
'user_show')(context, {'id': member[0]})
|
||||
member_details = p.toolkit.get_action('user_show')(context, {
|
||||
'id': member[0],
|
||||
'include_plugin_extras': True
|
||||
})
|
||||
|
||||
if member_details.get('email', None):
|
||||
recipients.append({
|
||||
|
|
Loading…
Reference in New Issue