Skip to content

Commit

Permalink
Merge pull request #95 from whdalsrnt/master
Browse files Browse the repository at this point in the history
fix: fix wrong project_group_id data when sync data source
  • Loading branch information
whdalsrnt authored Sep 20, 2023
2 parents ecd82c0 + 628f16f commit ed50fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spaceone/cost_analysis/manager/cost_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ def _rollback(cost_vo):
if self.project_group_map is None:
self.project_group_map = self._get_project_group_map(params['domain_id'])

if 'project_id' in params:
params['project_group_id'] = self.project_group_map.get(params['project_id'])

if 'region_code' in params and 'provider' in params:
params['region_key'] = f'{params["provider"]}.{params["region_code"]}'

Expand All @@ -46,6 +43,9 @@ def _rollback(cost_vo):

params = self.data_source_rule_mgr.change_cost_data(params)

if 'project_id' in params:
params['project_group_id'] = self.project_group_map.get(params['project_id'])

cost_vo: Cost = self.cost_model.create(params)

if execute_rollback:
Expand Down

0 comments on commit ed50fa6

Please sign in to comment.