mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 11:31:08 +00:00
Updates python formatting
This commit is contained in:
parent
f7b0a282a7
commit
daea57f91c
1 changed files with 9 additions and 5 deletions
|
@ -28,11 +28,15 @@ class Lists(View):
|
||||||
page = 1
|
page = 1
|
||||||
|
|
||||||
# hide lists with no approved books
|
# hide lists with no approved books
|
||||||
lists = models.List.objects.annotate(
|
lists = (
|
||||||
item_count=Count("listitem", filter=Q(listitem__approved=True))
|
models.List.objects.annotate(
|
||||||
).filter(
|
item_count=Count("listitem", filter=Q(listitem__approved=True))
|
||||||
item_count__gt=0
|
)
|
||||||
).order_by("-updated_date").distinct().all()
|
.filter(item_count__gt=0)
|
||||||
|
.order_by("-updated_date")
|
||||||
|
.distinct()
|
||||||
|
.all()
|
||||||
|
)
|
||||||
|
|
||||||
lists = privacy_filter(
|
lists = privacy_filter(
|
||||||
request.user, lists, privacy_levels=["public", "followers"]
|
request.user, lists, privacy_levels=["public", "followers"]
|
||||||
|
|
Loading…
Reference in a new issue