Commit 44168884 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

preserve notification_message's category and language only if notification_message is found.

this commit fixes a regression in ecb09a0d.
parent 324a334b
...@@ -191,17 +191,18 @@ class PasswordTool(BaseTool): ...@@ -191,17 +191,18 @@ class PasswordTool(BaseTool):
"Thank you", "Thank you",
mapping=message_dict) mapping=message_dict)
message = message.translate() message = message.translate()
event_keyword_argument_dict={}
else: else:
subject = notification_message.getTitle() subject = notification_message.getTitle()
if notification_message.getContentType() == "text/html": if notification_message.getContentType() == "text/html":
message = notification_message.asEntireHTML(substitution_method_parameter_dict=message_dict) message = notification_message.asEntireHTML(substitution_method_parameter_dict=message_dict)
else: else:
message = notification_message.asText(substitution_method_parameter_dict=message_dict) message = notification_message.asText(substitution_method_parameter_dict=message_dict)
event_keyword_argument_dict={ event_keyword_argument_dict={
'resource':notification_message.getSpecialise(), 'resource':notification_message.getSpecialise(),
'language':notification_message.getLanguage(), 'language':notification_message.getLanguage(),
} }
self.getPortalObject().portal_notifications.sendMessage(sender=sender, recipient=[user,], self.getPortalObject().portal_notifications.sendMessage(sender=sender, recipient=[user,],
subject=subject, message=message, subject=subject, message=message,
store_as_event=store_as_event, store_as_event=store_as_event,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment