fix: fixed data bug

This commit is contained in:
Андрей Сумин
2025-03-04 01:38:59 +03:00
parent bb1e08dba6
commit ecbae273b5
@@ -520,8 +520,8 @@ users = [
"role": UserRole.STUDENT.value, "role": UserRole.STUDENT.value,
}, },
{ {
"email": "oleg-tinkov@gmail.com", "email": "s.bliznyuk@tbank.ru",
"username": "oleg-tinkov", "username": "s_bliznyuk",
"password": "password123!", "password": "password123!",
"role": UserRole.STUDENT.value, "role": UserRole.STUDENT.value,
}, },
@@ -697,16 +697,13 @@ class Command(BaseCommand):
points=task["points"], points=task["points"],
submission_reviewers_count=task[ submission_reviewers_count=task[
"submission_reviewers_count" "submission_reviewers_count"
], ] if task["type"] == CompetitionTask.CompetitionTaskType.REVIEW.value else None,
correct_answer_file=task["correct_answer_file"] if task["type"] != CompetitionTask.CompetitionTaskType.REVIEW.value else None,
max_attempts=task.get("max_attempts"), max_attempts=task.get("max_attempts"),
) )
competitions[i]["tasks"][j]["obj"] = task_obj competitions[i]["tasks"][j]["obj"] = task_obj
if (
task["type"]
== CompetitionTask.CompetitionTaskType.INPUT.value
):
task_obj.correct_answer_file = task["correct_answer_file"]
if task.get("attachment"): if task.get("attachment"):
CompetitionTaskAttachment.objects.create( CompetitionTaskAttachment.objects.create(
task=task_obj, task=task_obj,