TestingView get
This commit is contained in:
1 parent
1f302acba7
commit
e50ea0a16f
1 file changed
+3
-4
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user