TestingView get

This commit is contained in:
cja committed 2025-05-30 10:17:56 +03:00
1 parent dd3e4ff5e5
commit 21db4bd95a
1 file changed
+3 -4
+3 -4
View File
@@ -253,11 +253,10 @@ class TestingView(generics.ListCreateAPIView):
try:
if test_id:
testings = Testing.objects.filter(test_id=test_id,
is_active=True,
user=user).select_related('user__user')
is_active=True).select_related('user__user')
else:
testings = Testing.objects.filter(is_active=True,
user=user).select_related('user__user')
testings = Testing.objects.filter(is_active=True
).select_related('user__user')
serializer = self.get_serializer(testings, many=True)
return Response(serializer.data)