Skip to content

Commit

Permalink
fix metrics logic
Browse files Browse the repository at this point in the history
  • Loading branch information
the-infinity committed Jul 18, 2024
1 parent 31657f1 commit f28e8aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.7.4

Released 2024-07-18

### Fixes

* Fix metrics logic


## 0.7.3

Released 2024-07-18
Expand Down
4 changes: 2 additions & 2 deletions webapp/prometheus_api/prometheus_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def get_parking_site_metrics(self) -> list[str]:
)
)
if parking_site.has_realtime_data:
if parking_site.realtime_capacity:
if parking_site.realtime_capacity is None:
continue
parking_site_realtime_capacity.metrics.append(
ParkingSiteMetric(
Expand All @@ -169,7 +169,7 @@ def get_parking_site_metrics(self) -> list[str]:
parking_site_name=parking_site.name,
)
)
if parking_site.realtime_free_capacity:
if parking_site.realtime_free_capacity is None:
continue
parking_site_realtime_free_capacity.metrics.append(
ParkingSiteMetric(
Expand Down

0 comments on commit f28e8aa

Please sign in to comment.