[koreader] Fix broken tests
This commit is contained in:
@ -298,6 +298,10 @@ def build_scrobbles_from_book_map(book_map: dict, user: "User") -> list["Scrobbl
|
|||||||
"page_data": scrobble_page_data,
|
"page_data": scrobble_page_data,
|
||||||
"pages_read": len(scrobble_page_data.keys()),
|
"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(
|
scrobbles_to_create.append(
|
||||||
Scrobble(
|
Scrobble(
|
||||||
book_id=book_id,
|
book_id=book_id,
|
||||||
@ -311,7 +315,7 @@ def build_scrobbles_from_book_map(book_map: dict, user: "User") -> list["Scrobbl
|
|||||||
in_progress=False,
|
in_progress=False,
|
||||||
played_to_completion=True,
|
played_to_completion=True,
|
||||||
long_play_complete=False,
|
long_play_complete=False,
|
||||||
timezone=timestamp.tzinfo.name,
|
timezone=tz,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
# Then start over
|
# Then start over
|
||||||
|
|||||||
Reference in New Issue
Block a user