Merge "Fix the import for filter_utils"
This commit is contained in:
commit
b2b94e070b
@ -28,6 +28,7 @@ from yaql.language import utils as yaql_utils
|
|||||||
from mistral.config import cfg
|
from mistral.config import cfg
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral import utils
|
from mistral import utils
|
||||||
|
from mistral.utils import filter_utils
|
||||||
|
|
||||||
# TODO(rakhmerov): it's work around the bug in YAQL.
|
# TODO(rakhmerov): it's work around the bug in YAQL.
|
||||||
# YAQL shouldn't expose internal types to custom functions.
|
# YAQL shouldn't expose internal types to custom functions.
|
||||||
@ -129,7 +130,7 @@ def executions_(context,
|
|||||||
filter = {}
|
filter = {}
|
||||||
|
|
||||||
if id is not None:
|
if id is not None:
|
||||||
filter = utils.filter_utils.create_or_update_filter(
|
filter = filter_utils.create_or_update_filter(
|
||||||
'id',
|
'id',
|
||||||
id,
|
id,
|
||||||
"eq",
|
"eq",
|
||||||
@ -137,7 +138,7 @@ def executions_(context,
|
|||||||
)
|
)
|
||||||
|
|
||||||
if root_execution_id is not None:
|
if root_execution_id is not None:
|
||||||
filter = utils.filter_utils.create_or_update_filter(
|
filter = filter_utils.create_or_update_filter(
|
||||||
'root_execution_id',
|
'root_execution_id',
|
||||||
root_execution_id,
|
root_execution_id,
|
||||||
"eq",
|
"eq",
|
||||||
@ -145,7 +146,7 @@ def executions_(context,
|
|||||||
)
|
)
|
||||||
|
|
||||||
if state is not None:
|
if state is not None:
|
||||||
filter = utils.filter_utils.create_or_update_filter(
|
filter = filter_utils.create_or_update_filter(
|
||||||
'state',
|
'state',
|
||||||
state,
|
state,
|
||||||
"eq",
|
"eq",
|
||||||
@ -153,7 +154,7 @@ def executions_(context,
|
|||||||
)
|
)
|
||||||
|
|
||||||
if from_time is not None:
|
if from_time is not None:
|
||||||
filter = utils.filter_utils.create_or_update_filter(
|
filter = filter_utils.create_or_update_filter(
|
||||||
'created_at',
|
'created_at',
|
||||||
from_time,
|
from_time,
|
||||||
"gte",
|
"gte",
|
||||||
@ -161,7 +162,7 @@ def executions_(context,
|
|||||||
)
|
)
|
||||||
|
|
||||||
if to_time is not None:
|
if to_time is not None:
|
||||||
filter = utils.filter_utils.create_or_update_filter(
|
filter = filter_utils.create_or_update_filter(
|
||||||
'created_at',
|
'created_at',
|
||||||
to_time,
|
to_time,
|
||||||
"lt",
|
"lt",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user