[koreader] Fix broken tests
All checks were successful
build & deploy / test (push) Successful in 1m41s
build & deploy / deploy (push) Has been skipped

This commit is contained in:
2026-03-11 16:21:01 -04:00
parent 4f8cf4f244
commit ad03f22b20

View File

@ -298,6 +298,10 @@ def build_scrobbles_from_book_map(book_map: dict, user: "User") -> list["Scrobbl
"page_data": scrobble_page_data,
"pages_read": len(scrobble_page_data.keys()),
}
if hasattr(timestamp.tzinfo, "tzname"):
tz = timestamp.tzinfo.tzname
if hasattr(timestamp.tzinfo, "name"):
tz = timestamp.tzinfo.name
scrobbles_to_create.append(
Scrobble(
book_id=book_id,
@ -311,7 +315,7 @@ def build_scrobbles_from_book_map(book_map: dict, user: "User") -> list["Scrobbl
in_progress=False,
played_to_completion=True,
long_play_complete=False,
timezone=timestamp.tzinfo.name,
timezone=tz,
)
)
# Then start over