refactor: return modules created

This commit is contained in:
pablohashescobar 2023-02-03 19:03:58 +05:30
parent a4f095fb59
commit 7207d92d62

View File

@ -185,7 +185,10 @@ class ModuleIssueViewSet(BaseViewSet):
batch_size=10, batch_size=10,
) )
return Response({"message": "Success"}, status=status.HTTP_200_OK) return Response(
ModuleIssueSerializer(self.get_queryset(), many=True).data,
status=status.HTTP_200_OK,
)
except Module.DoesNotExist: except Module.DoesNotExist:
return Response( return Response(
{"error": "Module Does not exists"}, status=status.HTTP_400_BAD_REQUEST {"error": "Module Does not exists"}, status=status.HTTP_400_BAD_REQUEST