from rest_framework.filters import BaseFilterBackend


class ArtistFilter(BaseFilterBackend):

    def filter_queryset(self, request, queryset, view):
        q = request.query_params.get
        user = request.user

        if q('exact_count'):
            query = queryset.filter(scrobble_count=q('exact_count'))
        if q('range_start') and q('range_end'):
            query = queryset.filter(
                scrobble_count__range=[q('range_start'), q('range_end')])
        return query

@@ -184,36 +184,8 @@
 .get
-%0A        user = request.user
 %0A%0A  
@@ -220,32 +220,35 @@
            query
+set
  = queryset.filt
@@ -348,16 +348,19 @@
    query
+set
  = query
@@ -445,16 +445,16 @@
 end')%5D)%0A
-
         
@@ -465,9 +465,12 @@
 rn query
+set
 %0A

Revert changes on ArtistFilter