diff options
| author | Djamel (otd) <otd@odoo.com> | 2021-02-26 10:23:03 +0000 |
|---|---|---|
| committer | Djamel (otd) <otd@odoo.com> | 2021-03-01 08:16:13 +0000 |
| commit | 7064d46a804ab86d1bc50d003b8ae63490a1ef9c (patch) | |
| tree | fd4ecf6a222e3d2dda2bd5ad7a27a932b82b80af /doc/python3.rst | |
| parent | 7fe9012301f606e153ad2ad04c392aa193c182f3 (diff) | |
[FIX] survey: fix the function extract comment from the answers
Steps to follow to reproduce the bug:
-Go to survey
-Choose any survey with at least one "single text box" question
-In the survey form
-Click on the button test
-Complete the survey, but in a "single text box" question, write the word "comment"
-Validate the survey
-An error is triggered.
Problem :
In the function which extracts comments from answers, it doesn't check the type in which the answer is stored.
When there is a comment, it is stored in a dict under the key: "comment".
To find the comment, the function checks if "comment"(key) is in the answer.
But in the case of "single text box" question, the answer is stored in a string.
If the word "comment" is present in the answer, the function looking for the key "comment" will return True and try to extract the comment.
Solution :
Add a check to ensure that we are looking for the key "comment" in dict type.
opw-2446194
closes odoo/odoo#66907
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Diffstat (limited to 'doc/python3.rst')
0 files changed, 0 insertions, 0 deletions
