Add context keyword in action eval
This commit is contained in:
1 parent
8b01a8627e
commit
e6ae8e6e3d
1 file changed
+2
@@ -132,6 +132,7 @@ class Action(object):
|
||||
ctx.update(context)
|
||||
|
||||
domain_context = ctx.copy()
|
||||
domain_context['context'] = ctx
|
||||
domain_context['time'] = time
|
||||
domain_context['datetime'] = datetime
|
||||
domain = eval(action['domain'], domain_context)
|
||||
@@ -140,6 +141,7 @@ class Action(object):
|
||||
domain.append(datas['domain'])
|
||||
|
||||
search_context = ctx.copy()
|
||||
search_context['context'] = ctx
|
||||
search_context['time'] = time
|
||||
search_context['datetime'] = datetime
|
||||
search_value = eval(action['search_value'] or '{}', search_context)
|
||||
|
||||
Reference in new issue
Block a user