Skip to content

Commit

Permalink
Cluster info - grab latest manifest accross month boundries. (#5079)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcouzens authored May 1, 2024
1 parent 41bb026 commit 5d8b4b4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions koku/api/provider/provider_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ def __init__(self, uuid):
self.manifest = (
CostUsageReportManifest.objects.filter(
provider=self._uuid,
billing_period_start_datetime=self.date_helper.this_month_start,
billing_period_start_datetime__in=[
self.date_helper.this_month_start,
self.date_helper.last_month_start,
],
creation_datetime__isnull=False,
)
.order_by("-creation_datetime")
Expand Down Expand Up @@ -188,7 +191,10 @@ def get_infrastructure_info(self):
manifest = (
CostUsageReportManifest.objects.filter(
provider=self.model.infrastructure.infrastructure_provider_id,
billing_period_start_datetime=self.date_helper.this_month_start,
billing_period_start_datetime__in=[
self.date_helper.this_month_start,
self.date_helper.last_month_start,
],
creation_datetime__isnull=False,
)
.order_by("-creation_datetime")
Expand Down

0 comments on commit 5d8b4b4

Please sign in to comment.