Return full shelf of shame by default
This commit is contained in:
parent
1579666db4
commit
767214b1aa
1 changed files with 1 additions and 3 deletions
|
|
@ -243,7 +243,7 @@ def get_most_expensive_game(query: BoardgameFilterParams = Depends(), top_amount
|
||||||
return statistic_to_return
|
return statistic_to_return
|
||||||
|
|
||||||
@app.get('/statistics/shelf_of_shame', response_model=statistic_classes.GamesStatistic)
|
@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)
|
boardgames_in_collection = data_connection.get_user_collection(session)
|
||||||
|
|
||||||
owned_boardgames = data_connection.get_user_owned_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)
|
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))
|
owned_boardgames_no_plays = list(filter(lambda x: len(x.plays) == 0, owned_boardgames_in_collection))
|
||||||
|
|
||||||
statistic_dict = {
|
statistic_dict = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue