#NEWLINE# @ list_route ( methods = [ 'get' ] , url_path = 'list-open' ) #NEWLINE# def list_open( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# open_conversations = ConversationRecipient . objects . filter ( deleted = False , recipient = request . user , status__in = [ ConversationRecipient . STATUS_OPEN , ConversationRecipient . STATUS_MINIMIZED ] ) #NEWLINE# instances = self . queryset . filter ( conversations__in = open_conversations ) #NEWLINE# serializer = self . serializer_class ( instance = instances , many = True , context = { #NEWLINE# #INDENT# 'request' : request , #NEWLINE# #UNINDENT# } ) #NEWLINE# return Response ( data = serializer . data , status = status . HTTP_200_OK )