From 9f41798b37e6931c3e5eb90b7366cc5d358635a9 Mon Sep 17 00:00:00 2001 From: hernani Date: Mon, 10 May 2010 18:48:55 +0000 Subject: [PATCH] Some fixes on subscriptions. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@198 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/subscriptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forum/subscriptions.py b/forum/subscriptions.py index 3fa4c69..45f430f 100644 --- a/forum/subscriptions.py +++ b/forum/subscriptions.py @@ -124,7 +124,7 @@ def answer_accepted(action, new): subscription_settings__enable_notifications=True, subscription_settings__notify_accepted=True, subscription_settings__subscribed_questions='i' - ).exclude(id=instance.accepted_by.id).distinct() + ).exclude(id=action.node.accepted.by.id).distinct() recipients = create_recipients_dict(subscribers) send_email(settings.EMAIL_SUBJECT_PREFIX + _("An answer to '%(question_title)s' was accepted") % dict(question_title=question.title), @@ -144,7 +144,7 @@ def member_joined(action, new): recipients = create_recipients_dict(subscribers) - send_email(settings.EMAIL_SUBJECT_PREFIX + _("%(username)s is a new member on %(app_name)s") % dict(username=instance.username, app_name=settings.APP_SHORT_NAME), + send_email(settings.EMAIL_SUBJECT_PREFIX + _("%(username)s is a new member on %(app_name)s") % dict(username=action.user.username, app_name=settings.APP_SHORT_NAME), recipients, "notifications/newmember.html", { 'newmember': action.user, }, threaded=False) -- 2.39.5