Skip to content

Commit

Permalink
Merge branch 'main' into unleash-disable-resource-matching
Browse files Browse the repository at this point in the history
  • Loading branch information
myersCody authored Dec 2, 2024
2 parents fc6c87a + 5f35779 commit 5d64f4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions koku/cost_models/cost_model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from cost_models.models import CostModelMap
from masu.processor.tasks import update_cost_model_costs


LOG = logging.getLogger(__name__)


Expand All @@ -34,8 +33,11 @@ def __init__(self, cost_model_uuid=None):
self._cost_model_uuid = None

if cost_model_uuid:
self._model = CostModel.objects.get(uuid=cost_model_uuid)
self._cost_model_uuid = cost_model_uuid
try:
self._model = CostModel.objects.get(uuid=cost_model_uuid)
self._cost_model_uuid = cost_model_uuid
except CostModel.DoesNotExist:
LOG.warning(f"CostModel with UUID {cost_model_uuid} does not exist.")

@property
def instance(self):
Expand Down

0 comments on commit 5d64f4b

Please sign in to comment.