mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-08-06 18:38:16 +02:00
Ensure that teams have a participation
This commit is contained in:
@@ -2,7 +2,7 @@ from corres2math.lists import get_sympa_client
|
||||
from participation.models import Participation, Team, Video
|
||||
|
||||
|
||||
def create_team_participation(instance, **_):
|
||||
def create_team_participation(instance, created, **_):
|
||||
"""
|
||||
When a team got created, create an associated team and create Video objects.
|
||||
"""
|
||||
@@ -12,6 +12,8 @@ def create_team_participation(instance, **_):
|
||||
if not participation.synthesis:
|
||||
participation.synthesis = Video.objects.create()
|
||||
participation.save()
|
||||
if not created:
|
||||
participation.team.create_mailing_list()
|
||||
|
||||
|
||||
def update_mailing_list(instance: Team, **_):
|
||||
|
Reference in New Issue
Block a user