#NEWLINE# def filter_is_solved( self , queryset , value ) : #NEWLINE# #INDENT# field = serializers . BooleanField ( ) #NEWLINE# value = field . to_internal_value ( value ) #NEWLINE# solved_filter = Q ( solution = None ) #NEWLINE# if value : #NEWLINE# #INDENT# solved_filter = ( ~ solved_filter ) #NEWLINE# #UNINDENT# return queryset . filter ( solved_filter )