mirror of
https://github.com/NaN-tic/tryton-gtk2.git
synced 2023-12-14 03:12:58 +01:00
Do not try to update keys if an RPCException occurs
issue6689 review38511002
This commit is contained in:
parent
ac099958c1
commit
36d2f2c9d8
1 changed files with 8 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue