diff --git a/src/spaceone/cost_analysis/service/cost_report_config_service.py b/src/spaceone/cost_analysis/service/cost_report_config_service.py index 95be5db5..5a3969d7 100644 --- a/src/spaceone/cost_analysis/service/cost_report_config_service.py +++ b/src/spaceone/cost_analysis/service/cost_report_config_service.py @@ -81,6 +81,9 @@ def update( params.cost_report_config_id, params.domain_id ) + if params.is_last_day is None: + params.is_last_day = False + cost_report_config_vo = self.cost_report_mgr.update_cost_report_config_by_vo( params.dict(exclude_unset=True), cost_report_config_vo ) diff --git a/src/spaceone/cost_analysis/service/cost_report_data_service.py b/src/spaceone/cost_analysis/service/cost_report_data_service.py index 76134ee5..ad1ba824 100644 --- a/src/spaceone/cost_analysis/service/cost_report_data_service.py +++ b/src/spaceone/cost_analysis/service/cost_report_data_service.py @@ -177,6 +177,7 @@ def create_cost_report_data(self, cost_report_config_vo: CostReportConfig): data_source_ids=data_source_ids, report_month=current_month, issue_day=issue_day, + is_confirmed=False, ) def _aggregate_monthly_cost_report_data( @@ -233,7 +234,7 @@ def _aggregate_monthly_cost_report_data( aggregated_cost_report.pop("data_source_id") ) aggregated_cost_report["cost"] = { - ag_cost_report_currency: aggregated_cost_report.pop("cost") + ag_cost_report_currency: aggregated_cost_report.pop("cost", 0.0) } aggregated_cost_report["currency"] = currency aggregated_cost_report["issue_date"] = f"{report_month}-{issue_day}"