фв
This commit is contained in:
1 parent
a796bb7483
commit
75cac4b928
2 files changed
+3
-1
No files matched your search
@@ -60,12 +60,14 @@ class VoteDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
results = Result.objects.filter(answer__question__vote=kwargs['id'])
|
||||
|
||||
if results:
|
||||
return Response({'status': 'error', 'message': 'voted'}, status=400)
|
||||
|
||||
try:
|
||||
vote = Vote.objects.get(id=kwargs['id'])
|
||||
except Exception as e:
|
||||
|
||||
return Response({'status': 'error', 'message': str(e)}, status=400)
|
||||
|
||||
answers_employee = Answer.objects.filter(question__vote=vote).filter(question__settings__choice="employee").values('name', 'question')
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
type="error"
|
||||
density="compact"
|
||||
title="Ошибка авторизации"
|
||||
:text="info"
|
||||
|
||||
v-model="alert"
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user