Amount of games over time statistic includes current date
This commit is contained in:
parent
f73accbacc
commit
efcecacd1f
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue