Skip to content

Commit

Permalink
Merge pull request #53 from TommyAmberson/main
Browse files Browse the repository at this point in the history
fix incorrect day_avg_hrs caching
  • Loading branch information
iamjustkoi authored Feb 22, 2024
2 parents 57210e2 + 3366d4c commit b0eb372
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,11 @@ def _total_due_in_tree(tree: DeckTreeNode):
cmd = Macro.CMD_DAY_AVERAGE_HOURS
pattern = _time_pattern(cmd)
for match in re.findall(pattern, updated_string):
logs = _cached_log(cmd, addon_config[Config.EXCLUDED_DIDS], _range_time_ms())
logs = _cached_log(
_cache_key(cmd, cell_data[Config.RANGE]),
addon_config[Config.EXCLUDED_DIDS],
_range_time_ms(),
)
from_date = datetime.fromtimestamp(_range_time_ms()[0] / 1000)
to_date = datetime.fromtimestamp(_range_time_ms()[1] / 1000)
days_in_logs = (to_date - from_date).days
Expand Down

0 comments on commit b0eb372

Please sign in to comment.