mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 02:47:10 +00:00
Merge branch 'master' of https://gitlab.prodcontest.ru/team-15/project
This commit is contained in:
@@ -35,6 +35,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"
|
||||
)
|
||||
|
||||
@@ -19,9 +19,7 @@ class CompetitionTask(BaseModel):
|
||||
def answer_file_upload_to(instance, filename) -> str:
|
||||
return f"tasks/{instance.id}/answer/{uuid4()}/{filename}"
|
||||
|
||||
in_competition_position = models.PositiveSmallIntegerField(
|
||||
null=True, blank=True
|
||||
)
|
||||
in_competition_position = models.PositiveSmallIntegerField()
|
||||
competition = models.ForeignKey(Competition, on_delete=models.CASCADE)
|
||||
title = models.CharField(verbose_name="заголовок", max_length=50)
|
||||
description = MartorField(verbose_name="описание")
|
||||
|
||||
Reference in New Issue
Block a user