Updates python formatting

This commit is contained in:
Mouse Reeve 2021-03-30 10:31:23 -07:00
parent f7b0a282a7
commit daea57f91c

View file

@ -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"]