fix: fixed is_participating issue, made task_position required

This commit is contained in:
Андрей Сумин
2025-03-02 23:33:08 +03:00
parent 43cf643e55
commit 69c5ccae80
2 changed files with 2 additions and 3 deletions
+1
View File
@@ -34,6 +34,7 @@ router = Router(tags=["competition"])
)
def start_competition(request, competition_id: UUID) -> PingOut:
competition = get_object_or_404(Competition, pk=competition_id)
competition.participants.add(request.auth)
state_obj, _ = State.objects.update_or_create(
user=request.auth, competition=competition, state="started"
)