Reformat
Django CI/CD / test (push) Successful in 56s Details
Django CI/CD / build-and-push (push) Successful in 1m53s Details

This commit is contained in:
Lukáš Kucharczyk 2024-02-18 09:03:35 +01:00
parent f9e37e9b1e
commit 18902aedac
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
4 changed files with 40 additions and 36 deletions

View File

@ -525,25 +525,29 @@ def stats(request, year: int = 0):
), ),
"all_purchased_this_year_count": all_purchased_this_year_count, "all_purchased_this_year_count": all_purchased_this_year_count,
"backlog_decrease_count": backlog_decrease_count, "backlog_decrease_count": backlog_decrease_count,
"longest_session_time": format_duration( "longest_session_time": (
longest_session.duration, "%2.0Hh %2.0mm" format_duration(longest_session.duration, "%2.0Hh %2.0mm")
)
if longest_session if longest_session
else 0, else 0
"longest_session_game": longest_session.purchase.edition.name ),
if longest_session "longest_session_game": (
else "N/A", longest_session.purchase.edition.name if longest_session else "N/A"
"highest_session_count": game_highest_session_count.session_count ),
"highest_session_count": (
game_highest_session_count.session_count
if game_highest_session_count if game_highest_session_count
else 0, else 0
"highest_session_count_game": game_highest_session_count.name ),
if game_highest_session_count "highest_session_count_game": (
else "N/A", game_highest_session_count.name if game_highest_session_count else "N/A"
"highest_session_average": format_duration( ),
"highest_session_average": (
format_duration(
highest_session_average_game.session_average, "%2.0Hh %2.0mm" highest_session_average_game.session_average, "%2.0Hh %2.0mm"
) )
if highest_session_average_game if highest_session_average_game
else 0, else 0
),
"highest_session_average_game": highest_session_average_game, "highest_session_average_game": highest_session_average_game,
"first_play_name": first_play_name, "first_play_name": first_play_name,
"first_play_date": first_play_date, "first_play_date": first_play_date,