We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 550bc27 commit 105b9c2Copy full SHA for 105b9c2
src/main.py
@@ -92,9 +92,10 @@ def get_and_update_historic_usage(
92
# Append the new usage data to the existing historic usage data
93
dates_added = []
94
new_usage_data = []
95
+ historic_usage_set = {d["day"] for d in historic_usage}
96
97
for day in usage_data:
- if not any(d["day"] == day["day"] for d in historic_usage):
98
+ if not day["day"] in historic_usage_set:
99
new_usage_data.append(day)
100
dates_added.append(day["day"])
101
logger.info("Added data for day %s", day["day"])
0 commit comments