From be3c62c1deb304c426087382e380fed0ddc01d17 Mon Sep 17 00:00:00 2001 From: sdubois18 Date: Thu, 6 May 2021 16:08:57 -0400 Subject: [PATCH] Got rid of features for now before demo --- moral_kombat_backend/lead/tables/views.py | 38 +++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/moral_kombat_backend/lead/tables/views.py b/moral_kombat_backend/lead/tables/views.py index 225ba3e7..4fc21df0 100644 --- a/moral_kombat_backend/lead/tables/views.py +++ b/moral_kombat_backend/lead/tables/views.py @@ -346,34 +346,34 @@ class IssuesViewSet(viewsets.ModelViewSet): # filter_backends = [DjangoFilterBackend] # filterset_fields = ['scenario_id', "name"] - def create(self, request, *args, **kwargs): + # def create(self, request, *args, **kwargs): - serializer = IssuesSerializer(data=request.data) + # serializer = IssuesSerializer(data=request.data) - if serializer.is_valid(): + # if serializer.is_valid(): - serializer.save() + # serializer.save() - scenarioID = serializer.data['scenario_id'] - issueID = serializer.data['issue'] + # scenarioID = serializer.data['scenario_id'] + # issueID = serializer.data['issue'] - stakeholders = stakeholders.objects.filter(scenario=scenarioID).values() + # stakeholders = stakeholders.objects.filter(scenario=scenarioID).values() - for stakeholder in stakeholders: - newCoverage = {} - newCoverage['stakeholder'] = stakeholder['stakeholder'] - newCoverage['issue'] = issueID - newCoverage['coverage_score'] = 0 + # for stakeholder in stakeholders: + # newCoverage = {} + # newCoverage['stakeholder'] = stakeholder['stakeholder'] + # newCoverage['issue'] = issueID + # newCoverage['coverage_score'] = 0 - coverageSerial = coverageSerializer(data=newCoverage) - if coverageSerial.is_valid(): - coverageSerial.save() - else: - return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + # coverageSerial = coverageSerializer(data=newCoverage) + # if coverageSerial.is_valid(): + # coverageSerial.save() + # else: + # return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) - return Response(serializer.data, status=status.HTTP_201_CREATED) + # return Response(serializer.data, status=status.HTTP_201_CREATED) - return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + # return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) class Action_pageViewSet(viewsets.ModelViewSet):