Add validation on DictSchemaMixin.selection
I get the following error when adding an attribute to a product:Traceback (most
recent call last):
File "/trytond/protocols/jsonrpc.py", line 123, in _marshaled_dispatch
response['result'] = dispatch_method(method, params)
File "/trytond/protocols/jsonrpc.py", line 156, in _dispatch
res = dispatch(*args)
File "/trytond/protocols/dispatcher.py", line 158, in dispatch
result = rpc.result(meth(*args, **kwargs))
File "/trytond/model/dictschema.py", line 74, in get_keys
selection = dict(json.loads(english_key.selection_json))
ValueError: dictionary update sequence element #0 has length 1; 2 is required
What I did: Created an attribute of type 'Selection' and entered three values
Then went to a material /product, on the line 'attributes' pressed the '+'
Button -> dump
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
screenshot.png | @coogor | 2013-07-11 07:00:24.234000 UTC | image/png |