Skip to content

Commit bbb899b

Browse files
fix file action emails
1 parent 76bbfe7 commit bbb899b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

addons/base/views.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,18 @@ def create_waterbutler_log(payload, **kwargs):
584584
event_context={
585585
'user_fullname': user.fullname,
586586
'action': payload['action'],
587-
'source_node': source_node,
588-
'destination_node': destination_node,
587+
'source_node': source_node._id,
588+
'source_node_title': source_node.title,
589+
'destination_node': destination_node._id,
590+
'destination_node_title': destination_node.title,
591+
'destination_node_parent_node_title': destination_node.parent_node.title if destination_node.parent_node else None,
589592
'source_path': payload['source']['materialized'],
590593
'source_addon': payload['source']['addon'],
591594
'destination_addon': payload['destination']['addon'],
592-
'osf_support_email': settings.OSF_SUPPORT_EMAIL
595+
'osf_support_email': settings.OSF_SUPPORT_EMAIL,
596+
'logo': settings.OSF_LOGO,
597+
'OSF_LOGO_LIST': settings.OSF_LOGO_LIST,
598+
'OSF_LOGO': settings.OSF_LOGO,
593599
}
594600
)
595601
if payload.get('errors'):

website/templates/file_operation_failed.html.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<th colspan="2" style="padding: 0px 15px 0 15px">
4747
<h3 style="padding: 0 15px 5px 15px; margin: 30px 0 0 0;border: none;list-style: none;font-weight: 300; border-bottom: 1px solid #eee; text-align: left;">
4848
${destination_node_title}
49-
%if destination_node.parent_node:
49+
%if destination_node_parent_node_title:
5050
<small style="font-size: 14px;color: #999;"> in ${destination_node_parent_node_title} </small>
5151
%endif
5252
</h3>

website/templates/file_operation_success.html.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<th colspan="2" style="padding: 0px 15px 0 15px">
4747
<h3 style="padding: 0 15px 5px 15px; margin: 30px 0 0 0;border: none;list-style: none;font-weight: 300; border-bottom: 1px solid #eee; text-align: left;">
4848
${destination_node_title}
49-
%if destination_node.parent_node:
49+
%if destination_node_parent_node_title:
5050
<small style="font-size: 14px;color: #999;"> in ${destination_node_parent_node_title} </small>
5151
%endif
5252
</h3>

0 commit comments

Comments
 (0)