Skip to content

Commit

Permalink
fix: fix report month error when run CostReportConfig
Browse files Browse the repository at this point in the history
Signed-off-by: ImMin5 <[email protected]>
  • Loading branch information
ImMin5 committed Sep 5, 2024
1 parent 4a4997c commit 6c2e420
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spaceone/cost_analysis/service/cost_report_serivce.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ def _get_is_create_report_and_report_month(

if retry_date.month != current_date.month:
issue_date = (current_date - relativedelta(months=1)).replace(day=issue_day)

report_date = current_date - relativedelta(months=2)
issue_day = self.get_issue_day(is_last_day, issue_day)
else:
Expand All @@ -738,6 +739,7 @@ def _get_is_create_report_and_report_month(

if issue_day == current_day:
is_create_report = True
report_month = (current_date - relativedelta(months=1)).strftime("%Y-%m")

return is_create_report, report_month

Expand Down

0 comments on commit 6c2e420

Please sign in to comment.