[FIX] fields: error if there is no value when convert a many2many relation
Closes #1165
This commit is contained in:
committed by
Denis Ledoux
parent
727f9056a3
commit
1511e788cf
@@ -1278,6 +1278,8 @@ class sparse(function):
|
||||
"""
|
||||
|
||||
if self._type == 'many2many':
|
||||
if not value:
|
||||
return []
|
||||
assert value[0][0] == 6, 'Unsupported m2m value for sparse field: %s' % value
|
||||
return value[0][2]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user