Skip to content
Snippets Groups Projects
Commit ed013ff6 authored by florimondmanca's avatar florimondmanca
Browse files

fix projets notifications recipients

parent 7daae7ac
No related branches found
No related tags found
1 merge request!4Release version ready to welcome first users
......@@ -33,7 +33,7 @@ class _NotifyOrgnizers(_BaseParticipationNotification):
"""Return the email of each organizer."""
edition = self.kwargs['edition']
# TODO add the project team's email
return list(edition.values_list('organizers__email', flat=True))
return list(edition.organizers.values_list('email', flat=True))
class _NotifyUser(_BaseParticipationNotification):
......
......@@ -8,7 +8,7 @@ from dynamicforms.models import Form
from profiles.factory import TutorFactory
from projects.factory import (EditionFactory, ParticipationFactory,
ProjectFactory)
from projects.models import EditionForm, Participation
from projects.models import EditionForm, Participation, EditionOrganizer
from projects.signals import (accepted, cancelled, deleted, pending, rejected,
valid)
......@@ -19,8 +19,11 @@ class NotifyParticipationTest(SignalTestMixin, TestCase):
def setUp(self):
# Create all objects that need to exist for rendering emails
project = ProjectFactory.create(name='Focus Europe')
self.edition = EditionFactory.create(project=project, year=2018)
recipient = TutorFactory.create()
self.edition = EditionFactory.create(project=project, year=2018)
EditionOrganizer.objects.create(
user=recipient.user,
edition=self.edition)
form = Form.objects.create(title=f'Inscriptions à {self.edition}')
EditionForm.objects.create(
edition=self.edition,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment