fix [P-227]: фикс мержей

This commit is contained in:
Denis Voinovich committed 2025-05-28 13:15:56 +03:00
1 parent c351557922
commit 898708b6f5
6 files changed
+39 -7

No files matched your search

+2 -2
View File
@@ -64,7 +64,7 @@ class GetTests(generics.ListAPIView):
"""Returns a QuerySet of tests filtered by status for a given user."""
print(status)
if status is None:
return Test.objects.all().order_by('dateend')
return Test.objects.all()
status_filters = {
'active' : Test.objects.filter(
@@ -77,7 +77,7 @@ class GetTests(generics.ListAPIView):
testing__completion_date__lt=now
).distinct()
}
return status_filters.get(status, Test.objects.none()).order_by('dateend')
return status_filters.get(status, Test.objects.none())
def set_attemps_number(self, user, tests):
"""Updates the number of attempts remaining for each test for the user."""