Don't remove elements from tuple on group's menu_access field
The changeSet 2a7d6a7e5c59 modified the returning of get() method of Many2Many fields, from dictionary of list to dictionary of tuples. issue4542 review14971002
This commit is contained in:
1 parent
ace2988e39
commit
4a2255c8d6
1 file changed
+2
-4
@@ -24,10 +24,8 @@ class MenuMany2Many(fields.Many2Many):
|
||||
('id', 'in', sub_ids),
|
||||
])))
|
||||
menu_ids = set(chain(*test_ids))
|
||||
for ids in res.itervalues():
|
||||
for id_ in ids[:]:
|
||||
if id_ not in menu_ids:
|
||||
ids.remove(id_)
|
||||
for group_id, ids in res.iteritems():
|
||||
res[group_id] = tuple(id_ for id_ in ids if id_ in menu_ids)
|
||||
return res
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user