Amount of games over time statistic includes current date

This commit is contained in:
Yarne Coppens 2024-10-01 12:51:10 +02:00
parent f73accbacc
commit efcecacd1f

View file

@ -116,6 +116,10 @@ def get_amount_of_games_over_time(session: Session, filtering_query: BoardgameFi
games_in_collection_at_date = list(filter(lambda game: game.owned_info.acquisition_date <= current_date, games_in_owned_collection)) games_in_collection_at_date = list(filter(lambda game: game.owned_info.acquisition_date <= current_date, games_in_owned_collection))
timeline_dict[current_date] = len(games_in_collection_at_date) timeline_dict[current_date] = len(games_in_collection_at_date)
current_date = date.today()
games_in_collection_at_date = list(filter(lambda game: game.owned_info.acquisition_date <= current_date, games_in_owned_collection))
timeline_dict[current_date] = len(games_in_collection_at_date)
statistic_dict = { statistic_dict = {
"name":statistic_name, "name":statistic_name,
"result":timeline_dict "result":timeline_dict