P-101
This commit is contained in:
1 parent
dce15627c5
commit
033d6fc079
1 file changed
+3
-3
@@ -45,9 +45,9 @@ class GetVotes(APIView):
|
||||
)
|
||||
vote.save()
|
||||
|
||||
def delete_vote_by_name(self,request):
|
||||
vote_name = request.data.get('vote_name')
|
||||
vote = Vote.objects.get(name=vote_name)
|
||||
def delete_vote(self,request):
|
||||
vote_id = request.data.get('vote_id')
|
||||
vote = Vote.objects.get(id=vote_id)
|
||||
questions = vote.questions.all()
|
||||
for question in questions:
|
||||
answers = question.answers.all()
|
||||
|
||||
Reference in new issue
Block a user