X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/61486d20fd5bf0a187868e3997ca7cdabe8acde7..56591af2593fc674efc8c27338f4b0ef5730ae7c:/forum/subscriptions.py diff --git a/forum/subscriptions.py b/forum/subscriptions.py index 7a5bf06..462e284 100644 --- a/forum/subscriptions.py +++ b/forum/subscriptions.py @@ -1,6 +1,7 @@ import os import re import datetime +import logging from forum.models import User, Question, Comment, QuestionSubscription, SubscriptionSettings, Answer from forum.utils.mail import send_template_email from django.utils.translation import ugettext as _ @@ -110,10 +111,9 @@ def answer_accepted(action, new): subscribers = question.subscribers.filter( subscription_settings__enable_notifications=True, - subscription_settings__notify_accepted=True, subscription_settings__subscribed_questions='i' ).exclude(id=action.node.nstate.accepted.by.id).distinct() - + subscribers = filter_subscribers(subscribers) send_template_email(subscribers, "notifications/answeraccepted.html", {'answer': action.node}) @@ -176,4 +176,4 @@ QuestionViewAction.hook(question_viewed) # # q_author.message_set.create(message=msg) # -#post_save.connect(record_answer_event, sender=Answer) \ No newline at end of file +#post_save.connect(record_answer_event, sender=Answer)