[IMP] api: compute methods cannot depend on field 'id'
This feature hasn't been implemented because of complexity problems. Therefore, we should not allow the developer to use it.
This commit is contained in:
parent
51e7e03502
commit
176e14d2bc
|
@ -191,6 +191,8 @@ def depends(*args):
|
|||
"""
|
||||
if args and callable(args[0]):
|
||||
args = args[0]
|
||||
elif any('id' in arg.split('.') for arg in args):
|
||||
raise NotImplementedError("Compute method cannot depend on field 'id'.")
|
||||
return lambda method: decorate(method, '_depends', args)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue