Skip to content

Commit 17751f2

Browse files
author
Jongmin Kim
committed
fix: fix service util bug
Signed-off-by: Jongmin Kim <whdalsrnt@megazone.com>
1 parent 130c58f commit 17751f2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/spaceone/core/service/utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def change_value_by_rule(rule: str, param_key: str, value: any = None) -> any:
7777
def wrapper(func: callable) -> callable:
7878
@functools.wraps(func)
7979
def wrapped_func(cls, params: dict) -> Union[dict, types.GeneratorType]:
80-
if param_value := params.get(param_key):
80+
if param_key in params:
81+
param_value = params[param_key]
8182
if rule == "APPEND":
8283
if isinstance(param_value, list):
8384
param_value.append(value)
@@ -287,7 +288,7 @@ def wrapped_func(cls, params):
287288

288289

289290
def change_timestamp_value(
290-
timestamp_keys=None, timestamp_format="google_timestamp"
291+
timestamp_keys=None, timestamp_format="google_timestamp"
291292
) -> callable:
292293
if timestamp_keys is None:
293294
timestamp_keys = []
@@ -339,7 +340,7 @@ def wrapped_func(cls, params):
339340

340341

341342
def change_timestamp_filter(
342-
filter_keys=None, timestamp_format="google_timestamp"
343+
filter_keys=None, timestamp_format="google_timestamp"
343344
) -> callable:
344345
if filter_keys is None:
345346
filter_keys = []
@@ -377,7 +378,7 @@ def _is_null(value) -> bool:
377378

378379

379380
def _change_timestamp_condition(
380-
query_filter, filter_keys, filter_type, timestamp_format
381+
query_filter, filter_keys, filter_type, timestamp_format
381382
) -> list:
382383
change_filter = []
383384

0 commit comments

Comments
 (0)