Skip to content

Commit

Permalink
change le type de notification testé
Browse files Browse the repository at this point in the history
  • Loading branch information
AmarOk1412 committed Mar 14, 2017
1 parent 18db297 commit 4db51ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zds/notification/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def content_published_event(sender, **kwargs):
by_email = kwargs.get('by_email')
authors = list(content.authors.all())
for user in authors:
if not NewPublicationSubscription.objects.get_existing(user, user):
if not ContentReactionAnswerSubscription.objects.get_existing(user, content):
ContentReactionAnswerSubscription.objects.toggle_follow(content, user, by_email=by_email)
# no need for condition here, get_or_create_active has its own
subscription = NewPublicationSubscription.objects.get_or_create_active(user, user)
Expand Down

0 comments on commit 4db51ee

Please sign in to comment.