diff --git a/src/back/vote/views.py b/src/back/vote/views.py index b6437b122..f47fe49da 100644 --- a/src/back/vote/views.py +++ b/src/back/vote/views.py @@ -113,7 +113,7 @@ class VoteCreate(APIView): questions = json.loads(request.data['questions']) for count, question_data in enumerate(questions, start=1): - question_image = questions_files.get(question_data['image']['name']) if 'image' in question_data else None + question_image = questions_files.get(question_data['image']['name']) if 'image' in question_data and question_data['image'] is not None else None question = Question.objects.create( name=question_data['text'], vote=vote, @@ -123,7 +123,7 @@ class VoteCreate(APIView): ) for answer in question_data['answers']: - answer_image = answers_files.get(answer['image']['name']) if 'image' in answer else None + answer_image = answers_files.get(answer['image']['name']) if 'image' in answer and answer['image'] is not None else None Answer.objects.create( name=answer['text'], file=answer_image, diff --git a/src/front/src/components/vote/CurrentVote.vue b/src/front/src/components/vote/CurrentVote.vue index 618750ac5..1e78374c3 100644 --- a/src/front/src/components/vote/CurrentVote.vue +++ b/src/front/src/components/vote/CurrentVote.vue @@ -32,10 +32,9 @@ -
-

{{ question.name }}

+ :step="question.numb"> +
+

{{ question.name }} (вариантов ответа: {{question.settings.multiChoice}})

-
diff --git a/src/front/src/components/vote/VoteResult.vue b/src/front/src/components/vote/VoteResult.vue index d30c80b49..6fce2e326 100644 --- a/src/front/src/components/vote/VoteResult.vue +++ b/src/front/src/components/vote/VoteResult.vue @@ -1,8 +1,23 @@