1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-26 05:42:20 +00:00
plateforme-corres2math/apps/participation/signals.py
2020-09-27 14:32:05 +02:00

11 lines
385 B
Python

from participation.models import Participation, Video
def create_team_participation(instance, **_):
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()