mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 01:59:55 +02:00
See #574: linting
This commit is contained in:
parent
bf3b3854dc
commit
77973ba6f9
3 changed files with 10 additions and 4 deletions
|
@ -557,7 +557,9 @@ class UploadQuerySet(models.QuerySet):
|
|||
libraries = Library.objects.viewable_by(actor)
|
||||
|
||||
if include:
|
||||
return self.filter(library__in=libraries, import_status="finished").distinct()
|
||||
return self.filter(
|
||||
library__in=libraries, import_status="finished"
|
||||
).distinct()
|
||||
return self.exclude(library__in=libraries, import_status="finished").distinct()
|
||||
|
||||
def local(self, include=True):
|
||||
|
|
|
@ -235,7 +235,9 @@ class SubsonicViewSet(viewsets.GenericViewSet):
|
|||
except (TypeError, KeyError, ValueError):
|
||||
size = 50
|
||||
|
||||
queryset = queryset.playable_by(actor).prefetch_related('uploads').order_by("?")[:size]
|
||||
queryset = (
|
||||
queryset.playable_by(actor).prefetch_related("uploads").order_by("?")[:size]
|
||||
)
|
||||
data = {
|
||||
"randomSongs": {
|
||||
"song": serializers.GetSongSerializer(queryset, many=True).data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue