Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
oser-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hamza Touizrat
oser-backend
Commits
ed013ff6
Commit
ed013ff6
authored
7 years ago
by
florimondmanca
Browse files
Options
Downloads
Patches
Plain Diff
fix projets notifications recipients
parent
7daae7ac
No related branches found
No related tags found
1 merge request
!4
Release version ready to welcome first users
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/notifications.py
+7
-7
7 additions, 7 deletions
projects/notifications.py
tests/test_projects/test_signals.py
+5
-2
5 additions, 2 deletions
tests/test_projects/test_signals.py
with
12 additions
and
9 deletions
projects/notifications.py
+
7
−
7
View file @
ed013ff6
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
tests/test_projects/test_signals.py
+
5
−
2
View file @
ed013ff6
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment