Failing to update selection leads to read error
When SelectionMixin
silently fails to search_read
, another error is raised when get_inactive_selection
is called for the value None
, such:
Traceback (most recent call last):
File "/tryton/tryton/trytond/trytond/protocols/dispatcher.py", line 195, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tryton/tryton/trytond/trytond/ir/lang.py", line 116, in read
res = super(Lang, cls).read(ids, fields_names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tryton/tryton/trytond/trytond/model/modelsql.py", line 940, in read
getter_results = field.get(
^^^^^^^^^^
File "/tryton/tryton/trytond/trytond/model/fields/function.py", line 26, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tryton/tryton/trytond/trytond/model/fields/function.py", line 118, in get
records = Model.browse(ids)
^^^^^^^^^^^^^^^^^
File "/tryton/tryton/trytond/trytond/model/modelstorage.py", line 672, in browse
ids = list(map(int, ids))
^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'