From: jordan Date: Sun, 27 Mar 2011 22:32:03 +0000 (+0000) Subject: OSQA-178, we notify the current user with a message after a node has been deleted... X-Git-Tag: live~388 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/af8a49892d4eea73d625a936cf84ca78f10d99e3 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 --- 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)