cleaner syntax
parent
d9da48ef31
commit
618d54a455
|
@ -48,9 +48,7 @@ def header(facet=None):
|
||||||
def product(edition, facet=None):
|
def product(edition, facet=None):
|
||||||
ebooks=facet.filter_model("Ebook",edition.ebooks.filter(active=True)) if facet else edition.ebooks.filter(active=True)
|
ebooks=facet.filter_model("Ebook",edition.ebooks.filter(active=True)) if facet else edition.ebooks.filter(active=True)
|
||||||
# Just because an edition satisfies 2 facets with multiple ebooks doesn't mean that there is a single ebook satisfies both facets
|
# Just because an edition satisfies 2 facets with multiple ebooks doesn't mean that there is a single ebook satisfies both facets
|
||||||
for ebook in ebooks:
|
if not ebooks.exists():
|
||||||
break
|
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
work=edition.work
|
work=edition.work
|
||||||
|
|
Loading…
Reference in New Issue