From ae0da2ea9ad65f839dda79a7e5f8caaa941e1d46 Mon Sep 17 00:00:00 2001 From: Spaarsh <67336892+Spaarsh@users.noreply.github.com> Date: Tue, 10 Dec 2024 06:50:29 +0530 Subject: [PATCH] Fixed the issue#9946 (#10017) * Fixed the issue#9946 The issue#9946 was occurring due to "?mode=ebooks" being default at some point in time earlier. Since that is not the case anymore, according to the openlibrary/openlibrary/templates/type/edition/view.html, the editions_limit was being assigned the value 10 always. This prevented the default value of editions_limit to be None (which is then used in openlibrary/openlibrary/templates/type/work/editions_database.html). The change includes the 'None' to be one of the acceptable states, restoring the originally intended logic. * Revert "Fixed the issue#9946" This reverts commit 5f45188c4b64e6255b40b7502f4e33128c9ac923. * Fixing editions_datatable.html conditional statement --- openlibrary/templates/type/work/editions_datatable.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlibrary/templates/type/work/editions_datatable.html b/openlibrary/templates/type/work/editions_datatable.html index 7d36bf0e280..3ceeda54705 100644 --- a/openlibrary/templates/type/work/editions_datatable.html +++ b/openlibrary/templates/type/work/editions_datatable.html @@ -3,7 +3,7 @@ $ book_keys = [] $ edition_list_start = time() -$if editions_limit or (len(editions) < work.edition_count): +$if (editions_limit and len(editions) > editions_limit) or (len(editions) < work.edition_count):
$ungettext('Showing %(count)d featured edition.', 'Showing %(count)d featured editions.', len(editions), count=len(editions))