#NEWLINE# def remove_invalid_fields( self , queryset , fields , view ) : #NEWLINE# #INDENT# valid_fields = [ queryset [ 0 ] for item in self . get_valid_fields ( queryset , view ) ] #NEWLINE# return [ term for term in fields if ( term . lstrip ( '-' ) in valid_fields ) ]