mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 17:22:51 +02:00
Drop a lot of Corres2math content
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from tfjm.lists import get_sympa_client
|
||||
from participation.models import Participation, Team, Video
|
||||
from participation.models import Participation, Team
|
||||
|
||||
|
||||
def create_team_participation(instance, created, **_):
|
||||
@ -10,10 +10,6 @@ def create_team_participation(instance, created, **_):
|
||||
When a team got created, create an associated team and create Video objects.
|
||||
"""
|
||||
participation = Participation.objects.get_or_create(team=instance)[0]
|
||||
if not participation.solution:
|
||||
participation.solution = Video.objects.create()
|
||||
if not participation.synthesis:
|
||||
participation.synthesis = Video.objects.create()
|
||||
participation.save()
|
||||
if not created:
|
||||
participation.team.create_mailing_list()
|
||||
@ -38,9 +34,3 @@ def update_mailing_list(instance: Team, **_):
|
||||
get_sympa_client().subscribe(coach.user.email, f"equipe-{instance.trigram.lower()}", False,
|
||||
f"{coach.user.first_name} {coach.user.last_name}")
|
||||
|
||||
|
||||
def delete_related_videos(instance: Participation, **_):
|
||||
if instance.solution:
|
||||
instance.solution.delete()
|
||||
if instance.synthesis:
|
||||
instance.synthesis.delete()
|
||||
|
Reference in New Issue
Block a user