[FIX] yaml: more explicit error if !record has missing parameters
bzr revid: odo@openerp.com-20121029173421-bbx9kn0xp10bpeh1
This commit is contained in:
parent
6dd4a1ae5f
commit
290baa5be7
|
@ -109,6 +109,8 @@ def assert_constructor(loader, node):
|
|||
|
||||
def record_constructor(loader, node):
|
||||
kwargs = loader.construct_mapping(node)
|
||||
assert "model" in kwargs, "'model' argument is required for !record"
|
||||
assert "id" in kwargs, "'id' argument is required for !record"
|
||||
return Record(**kwargs)
|
||||
|
||||
def python_constructor(loader, node):
|
||||
|
|
Loading…
Reference in New Issue