mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 17:41: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
|
||||
|
||||
# hide lists with no approved books
|
||||
lists = models.List.objects.annotate(
|
||||
item_count=Count("listitem", filter=Q(listitem__approved=True))
|
||||
).filter(
|
||||
item_count__gt=0
|
||||
).order_by("-updated_date").distinct().all()
|
||||
lists = (
|
||||
models.List.objects.annotate(
|
||||
item_count=Count("listitem", filter=Q(listitem__approved=True))
|
||||
)
|
||||
.filter(item_count__gt=0)
|
||||
.order_by("-updated_date")
|
||||
.distinct()
|
||||
.all()
|
||||
)
|
||||
|
||||
lists = privacy_filter(
|
||||
request.user, lists, privacy_levels=["public", "followers"]
|
||||
|
|
Loading…
Reference in a new issue