Tryton - Issues

 

Issue6988

Title On creation of records the client sent empty list for X2M fields which triggers write access errors
Priority bug Status resolved
Superseder Nosy List nicoe, reviewbot, roundup-bot
Type behavior Components sao, tryton
Assigned To nicoe Keywords review
Reviews 41711002, 43801002
View: 41711002, 43801002

Created on 2017-12-06.17:44:28 by nicoe, last changed by roundup-bot.

Messages
New changeset 3c43935240a6 by Nicolas ?vrard in branch 'default':
Do not return empty action list for X2M field when getting a record value
http://hg.tryton.org/sao/rev/3c43935240a6
New changeset 9a4e02ec421a by Nicolas ?vrard in branch 'default':
Do not return empty action list for X2M field when getting a record value
http://hg.tryton.org/tryton/rev/9a4e02ec421a
review43801002 updated at https://codereview.tryton.org/43801002/#ps20001
review41711002 updated at https://codereview.tryton.org/41711002/#ps20001
New review43801002 at https://codereview.tryton.org/43801002/#ps1
New review41711002 at https://codereview.tryton.org/41711002/#ps1
msg37156 (view) Author: [hidden] (nicoe) (Tryton committer) (Tryton translator) Date: 2017-12-06.17:44:27
Since 521efe70c09b the clients sent an empty list for X2M record fields on creation of records. In modelsql.py a ModelFieldAccess.check call is made for every field passed to the function call. It results in a write access error for field that were left untouched.

The fix I propose is to remove the empty list sent by the client by removing them when computing the value of the record.
History
Date User Action Args
2017-12-09 16:24:59roundup-botsetmessages: + msg37177
2017-12-09 16:23:02roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg37176
2017-12-09 15:18:52reviewbotsetmessages: + msg37175
2017-12-09 15:18:34reviewbotsetmessages: + msg37174
2017-12-06 17:47:06reviewbotsetmessages: + msg37159
2017-12-06 17:47:05reviewbotsetreviews: 41711002 -> 41711002, 43801002
2017-12-06 17:46:47reviewbotsetnosy: + reviewbot
messages: + msg37158
2017-12-06 17:46:47reviewbotsetreviews: 41711002
keyword: + review
2017-12-06 17:44:28nicoecreate

Showing 10 items. Show all history (warning: this could be VERY long)