Fix Kobo popup when ProgressPercent is 0 by using is-not-None check instead of truthiness

This commit is contained in:
leahjessie
2026-02-20 15:34:25 -08:00
parent d229f71151
commit a4bf028537

View File

@@ -898,9 +898,9 @@ def get_current_bookmark_response(current_bookmark):
resp = {
"LastModified": convert_to_kobo_timestamp_string(current_bookmark.last_modified),
}
if current_bookmark.progress_percent:
if current_bookmark.progress_percent is not None:
resp["ProgressPercent"] = _clean_progress(current_bookmark.progress_percent)
if current_bookmark.content_source_progress_percent:
if current_bookmark.content_source_progress_percent is not None:
resp["ContentSourceProgressPercent"] = _clean_progress(current_bookmark.content_source_progress_percent)
if current_bookmark.location_value:
resp["Location"] = {