From a83b4a6702b424c2b47b9d5568abe7db898680ce Mon Sep 17 00:00:00 2001 From: apetrich Date: Fri, 3 May 2019 10:44:30 +0200 Subject: [PATCH] Fix the import for filter_utils Changed from importing utils and calling it via utils.filter_utils to a proper import utils.__init__.py didn't export it so the way it was called probably worked for python 2 only. This way is a more ubiquitous way of calling it. Change-Id: Ie6a073dc286f0d8704c67f8295dfd76bce7897bb --- mistral/utils/expression_utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mistral/utils/expression_utils.py b/mistral/utils/expression_utils.py index 024f34c6b..1c2f44796 100644 --- a/mistral/utils/expression_utils.py +++ b/mistral/utils/expression_utils.py @@ -28,6 +28,7 @@ from yaql.language import utils as yaql_utils from mistral.config import cfg from mistral.db.v2 import api as db_api from mistral import utils +from mistral.utils import filter_utils # TODO(rakhmerov): it's work around the bug in YAQL. # YAQL shouldn't expose internal types to custom functions. @@ -129,7 +130,7 @@ def executions_(context, filter = {} if id is not None: - filter = utils.filter_utils.create_or_update_filter( + filter = filter_utils.create_or_update_filter( 'id', id, "eq", @@ -137,7 +138,7 @@ def executions_(context, ) 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, "eq", @@ -145,7 +146,7 @@ def executions_(context, ) if state is not None: - filter = utils.filter_utils.create_or_update_filter( + filter = filter_utils.create_or_update_filter( 'state', state, "eq", @@ -153,7 +154,7 @@ def executions_(context, ) if from_time is not None: - filter = utils.filter_utils.create_or_update_filter( + filter = filter_utils.create_or_update_filter( 'created_at', from_time, "gte", @@ -161,7 +162,7 @@ def executions_(context, ) if to_time is not None: - filter = utils.filter_utils.create_or_update_filter( + filter = filter_utils.create_or_update_filter( 'created_at', to_time, "lt",