Add emulated property to sessions
Some checks failed
Django CI/CD / test (push) Successful in 1m16s
Django CI/CD / build-and-push (push) Has been cancelled

This commit is contained in:
2025-01-29 13:43:35 +01:00
parent c2853a3ecc
commit ba6028e43d
10 changed files with 92 additions and 70 deletions

View File

@ -15,7 +15,7 @@ from common.components import (
Div,
Form,
Icon,
LinkedNameWithPlatformIcon,
NameWithIcon,
Popover,
)
from common.time import (
@ -130,12 +130,8 @@ def list_sessions(request: HttpRequest, search_string: str = "") -> HttpResponse
],
"rows": [
[
LinkedNameWithPlatformIcon(
name=session.purchase.first_edition.name,
game_id=session.purchase.first_edition.game.pk,
platform=session.purchase.platform,
),
f"{local_strftime(session.timestamp_start)}{f"{local_strftime(session.timestamp_end, timeformat)}" if session.timestamp_end else ""}",
NameWithIcon(session_id=session.pk),
f"{local_strftime(session.timestamp_start)}{f'{local_strftime(session.timestamp_end, timeformat)}' if session.timestamp_end else ''}",
(
format_duration(session.duration_calculated, durationformat)
if session.duration_calculated