From af8a49892d4eea73d625a936cf84ca78f10d99e3 Mon Sep 17 00:00:00 2001 From: jordan Date: Sun, 27 Mar 2011 22:32:03 +0000 Subject: [PATCH] OSQA-178, we notify the current user with a message after a node has been deleted him. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@908 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/actions/meta.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forum/actions/meta.py b/forum/actions/meta.py index a964ef1..e966e55 100644 --- a/forum/actions/meta.py +++ b/forum/actions/meta.py @@ -182,6 +182,10 @@ class DeleteAction(ActionProxy): if self.node.node_type == "answer": self.node.question.reset_answer_count_cache() + # We should notify the current user that the node has been successfully deleted + message = _("The %s has been sucessfully deleted") % (self.node.get_absolute_url(), self.node.node_type) + self.user.message_set.create(message=message) + def cancel_action(self): self.node.mark_deleted(None) -- 2.39.5