[FIX] survey: fix typo in survey templates and lint some code
From "Their was an error during the validation of the survey." To "There was an error during the validation of the survey." Some side code linting is also performed because my linter is screaming on me. Task ID 1919290 PR #41429 Co-Authored-By: Aurélien Warnon <awa@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
This commit is contained in:
committed by
Thibault Delavallée
co-authored by
Thibault Delavallée
parent
864cb9132d
commit
a5f115d1fc
@@ -151,8 +151,9 @@ class SurveyQuestion(models.Model):
|
||||
next_page_index = page._index()
|
||||
break
|
||||
|
||||
question.question_ids = question.survey_id.question_ids.filtered(lambda q:
|
||||
q._index() > question._index() and (not next_page_index or q._index() < next_page_index))
|
||||
question.question_ids = question.survey_id.question_ids.filtered(
|
||||
lambda q: q._index() > question._index() and (not next_page_index or q._index() < next_page_index)
|
||||
)
|
||||
else:
|
||||
question.question_ids = self.env['survey.question']
|
||||
|
||||
@@ -164,11 +165,9 @@ class SurveyQuestion(models.Model):
|
||||
question.page_id = None
|
||||
else:
|
||||
question.page_id = next(
|
||||
(iter(question
|
||||
.survey_id
|
||||
.question_and_page_ids
|
||||
.filtered(lambda q: q.is_page and q.sequence < question.sequence)
|
||||
.sorted(reverse=True))),
|
||||
(iter(question.survey_id.question_and_page_ids.filtered(
|
||||
lambda q: q.is_page and q.sequence < question.sequence
|
||||
).sorted(reverse=True))),
|
||||
None
|
||||
)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<input type="hidden" name="token" t-att-value="answer.access_token" />
|
||||
<div class="o_survey_error alert alert-danger d-none" role="alert">
|
||||
<p>Their was an error during the validation of the survey.</p>
|
||||
<p>There was an error during the validation of the survey.</p>
|
||||
</div>
|
||||
<t t-if="survey.questions_layout == 'one_page'">
|
||||
<t t-foreach='survey.question_and_page_ids' t-as='question'>
|
||||
|
||||
Reference in New Issue
Block a user