From 138c518ff1084263cff970e8bf05828afe04c565 Mon Sep 17 00:00:00 2001 From: seolmin Date: Wed, 18 Dec 2024 12:57:08 +0900 Subject: [PATCH] fix: add integer type in timediff options Signed-off-by: seolmin --- .../manager/data_table_manager/data_source_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py b/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py index 0b46cf9..c058015 100644 --- a/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py +++ b/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py @@ -223,8 +223,8 @@ def _change_datetime_format(results: list) -> list: def _change_date_by_timediff(self, date: str) -> str: dt = self._get_datetime_from_str(date) - years = self.timediff.get("years", 0) - months = self.timediff.get("months", 0) + years = int(self.timediff.get("years", 0)) + months = int(self.timediff.get("months", 0)) if years: dt = dt - relativedelta(years=years)