From 767214b1aae754069e4f8fb398d385dc5e752a56 Mon Sep 17 00:00:00 2001 From: Yarne Coppens Date: Thu, 15 Aug 2024 21:48:30 +0200 Subject: [PATCH] Return full shelf of shame by default --- src/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.py b/src/main.py index ee1c21d..7f7c977 100644 --- a/src/main.py +++ b/src/main.py @@ -243,7 +243,7 @@ def get_most_expensive_game(query: BoardgameFilterParams = Depends(), top_amount return statistic_to_return @app.get('/statistics/shelf_of_shame', response_model=statistic_classes.GamesStatistic) -def get_shelf_of_shame(query: BoardgameFilterParams = Depends(), top_amount: int = 10, session: Session = Depends(get_session)): +def get_shelf_of_shame(query: BoardgameFilterParams = Depends(), top_amount: int = -1, session: Session = Depends(get_session)): boardgames_in_collection = data_connection.get_user_collection(session) owned_boardgames = data_connection.get_user_owned_collection(session) @@ -257,8 +257,6 @@ def get_shelf_of_shame(query: BoardgameFilterParams = Depends(), top_amount: int owned_boardgames_in_collection = query.do_filtering(owned_boardgames_in_collection) - print(owned_boardgames_in_collection[0].plays) - owned_boardgames_no_plays = list(filter(lambda x: len(x.plays) == 0, owned_boardgames_in_collection)) statistic_dict = {