From 8c6f85d393ef9b00fc0ef1b1065b232c72417271 Mon Sep 17 00:00:00 2001 From: "Mikel Martin (from h4)" Date: Tue, 16 Jul 2024 15:29:20 +0200 Subject: [PATCH] Fix syntax error --- survey_question_type_binary/models/survey_question.py | 2 +- survey_question_type_binary/models/survey_user_input.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/survey_question_type_binary/models/survey_question.py b/survey_question_type_binary/models/survey_question.py index 2f5a501d..b4565f96 100644 --- a/survey_question_type_binary/models/survey_question.py +++ b/survey_question_type_binary/models/survey_question.py @@ -38,7 +38,7 @@ def validate_binary(self, answers): if self.constr_mandatory and not answers: errors.update({self.id: self.constr_error_msg}) if answers: - if not isinstance(answers | (list, tuple)): + if not isinstance(answers, (list, tuple)): answers = [answers] for answer in answers: try: diff --git a/survey_question_type_binary/models/survey_user_input.py b/survey_question_type_binary/models/survey_user_input.py index 3ac6ba1b..17ff5eef 100644 --- a/survey_question_type_binary/models/survey_user_input.py +++ b/survey_question_type_binary/models/survey_user_input.py @@ -15,7 +15,7 @@ def _save_lines(self, question, answer, comment=None, overwrite_existing=True): ) if question.question_type in ("binary", "multi_binary"): - if not isinstance(answer | (list, tuple)): + if not isinstance(answer , (list, tuple)): answer = [answer] if not answer: answer = [False] @@ -36,7 +36,7 @@ def _get_line_answer_values(self, question, answer, answer_type): del vals["value_binary"] else: del vals["value_multi_binary"] - if not isinstance(answer | (list, tuple)): + if not isinstance(answer , (list, tuple)): answer = [answer] answer_binary_datas = [] for answer_binary in answer: