Skip to content
Snippets Groups Projects
Commit 8f3d8272 authored by David Beguin's avatar David Beguin Committed by Aurélien Warnon
Browse files

[FIX] survey: fix matrix prepare answer method


The matrix data structure awaited by the server is the following :
{
    question_id: {
        'row_id_1': ['col_id1', ..., 'col_idn'],
        'row_id_n': ['col_id1', ..., 'col_idn'],
        'comment': 'This is a comment',
    }
}

Before this commit, the comment was encapsulated into a dict, into an array,
with an incorrect key :
    -> 'questionId_comment': [{'comment': 'This is a comment'}]

This was leading to 2 errors :
- A traceback when nothing is selected in the matrix options
- Comment is never saved.

After this commit, the comment is correctly given to and extracted by the
server. So the comment is saved and the traceback is avoided.

Task ID: 2152223

closes odoo/odoo#43086

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: default avatarAurélien Warnon <awa@odoo.com>
parent 2d4711a3
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment