Skip to content

Commit

Permalink
Fixed the issue#9946 (#10017)
Browse files Browse the repository at this point in the history
* 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 5f45188.

* Fixing editions_datatable.html conditional statement
  • Loading branch information
Spaarsh authored Dec 10, 2024
1 parent e34b186 commit ae0da2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openlibrary/templates/type/work/editions_datatable.html
Original file line number Diff line number Diff line change
Expand Up @@ -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):
<p class="small sansserif featured-count">

$ungettext('Showing %(count)d featured edition.', 'Showing %(count)d featured editions.', len(editions), count=len(editions))
Expand Down

0 comments on commit ae0da2e

Please sign in to comment.