Notification emails #80
@ -101,6 +101,9 @@ def _setup_followers(
|
||||
|
||||
@receiver(m2m_changed, sender=Extension.authors.through)
|
||||
def _update_authors_follow(instance, action, model, reverse, pk_set, **kwargs):
|
||||
if action not in ['post_add', 'post_remove']:
|
||||
return
|
||||
|
||||
if model == Extension and not reverse:
|
||||
users = [instance]
|
||||
extensions = Extension.objects.filter(pk__in=pk_set)
|
||||
|
@ -48,6 +48,9 @@ def update_moderator_follows(instance, action, model, reverse, pk_set, **kwargs)
|
||||
The flag=Flag.MODERATOR is used to avoid deleting follow relations that were created in contexts
|
||||
other than moderator's duties.
|
||||
"""
|
||||
if action not in ['post_add', 'post_remove']:
|
||||
return
|
||||
|
||||
moderators = Group.objects.get(name='moderators')
|
||||
extensions = Extension.objects.all()
|
||||
users = []
|
||||
|
Loading…
Reference in New Issue
Block a user