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