-
- Downloads
[FIX] survey: allow to modify a completed survey
Updating a completed survey will raise an error with a traceback.
To reproduce the error:
(Use demo data)
1. Survey > Participations
2. Select a completed form
3. Change one answer, Save
Error: A traceback appears "[...] ValueError: Computing score requires a
question in arguments."
Here is an extract from the method concerned:
```python
@api.model
def _get_answer_score_values(self, vals, compute_speed_score=True):
"""
[...]
"""
user_input_id = vals.get('user_input_id')
answer_type = vals.get('answer_type')
question_id = vals.get('question_id')
if not question_id:
raise ValueError(_('Computing score requires a question in
arguments.'))
```
This method needs some information to work properly.
OPW-2488974
closes odoo/odoo#69842
Signed-off-by:
Adrien Widart <adwid@users.noreply.github.com>
Loading
Please register or sign in to comment