Do not try to update keys if an RPCException occurs

issue6689
review38511002
This commit is contained in:
C?dric Krier 2017-08-07 19:53:11 +02:00
parent ac099958c1
commit 36d2f2c9d8

View file

@ -507,14 +507,17 @@ class DictWidget(Widget):
key_ids = RPCExecute('model', self.schema_model, 'search',
[('name', 'in', sub_keys), domain], 0,
CONFIG['client.limit'], None, context=context)
if not key_ids:
continue
except RPCException:
key_ids = []
if not key_ids:
continue
try:
values = RPCExecute('model', self.schema_model,
'get_keys', key_ids, context=context)
if not values:
continue
except RPCException:
pass
values = []
if not values:
continue
self.keys.update({k['name']: k for k in values})
def display(self, record, field):