Conversation
Coalesce the imprint series_count/universe issue_count subqueries to 0. A correlated Subquery returns NULL (not 0) when an imprint has no series or a universe has no issues, which still tripped the blocktrans counter TemplateSyntaxError the prior fix in #600 didn't cover (e.g. dc-comics, which has several empty imprints/universes).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
imprint.series_count/universe.issue_counton the publisher detail page but still crashed in production on/publisher/dc-comics/Subquery(Count(...))annotation returnsNULL(not0) when an imprint has zero series or a universe has zero issues — DC Comics has several imprints/universes with nothing tagged to them yet (e.g. theamazoniauniverse){% blocktrans count counter=... %}still raisedTemplateSyntaxError: 'counter' argument to 'blocktrans' tag must be a numberforNone, just as it did for the missing annotation in Fix TemplateSyntaxError on publisher detail page #600Coalesce(..., 0)inPublisherDetailand thePublisherImprintsLoadMore/PublisherUniversesLoadMoreHTMX endpoints