SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 2f5a4972 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Debug again

parent ff020a30
No related branches found
No related tags found
No related merge requests found
...@@ -14,8 +14,9 @@ def notify_manuscript_published(sender, instance, created, **kwargs): ...@@ -14,8 +14,9 @@ def notify_manuscript_published(sender, instance, created, **kwargs):
instance -- Publication instance instance -- Publication instance
""" """
if instance.is_published: if instance.is_published:
authors = User.objects.filter(contributor__profile__publications=instance)
editorial_administration = Group.objects.get(name='Editorial Administrators') editorial_administration = Group.objects.get(name='Editorial Administrators')
for user in authors: for profile in instance.authors.all():
notify.send(sender=sender, recipient=user, actor=editorial_administration, if profile.has_active_contributor:
verb=' published your manuscript.', target=instance) notify.send(sender=sender, recipient=profile.contributor.user,
actor=editorial_administration,
verb=' published your manuscript.', target=instance)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment