Skip to content

Commit

Permalink
fix: Last Influx data updated at never updates
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa committed Sep 22, 2023
1 parent e62be85 commit b420214
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/sales_dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ def get_context_data(self, **kwargs):
# when the caches were last updated.
try:
subscription_information_caches_influx_updated_at = (
OrganisationSubscriptionInformationCache.objects.order_by(
"-influx_updated_at"
OrganisationSubscriptionInformationCache.objects.filter(
influx_updated_at__isnull=False
)
.order_by("-influx_updated_at")
.first()
.influx_updated_at.strftime("%H:%M:%S %d/%m/%Y")
)

except AttributeError:
subscription_information_caches_influx_updated_at = None

Expand Down

0 comments on commit b420214

Please sign in to comment.