#NEWLINE# @ json_view ( permission = 'view_tender' ) #NEWLINE# def get( self ) : #NEWLINE# #INDENT# 'Tender Complaint Document Read' #NEWLINE# if self . request . params . get ( 'download' ) : #NEWLINE# #INDENT# return get_file ( self . request ) #NEWLINE# #UNINDENT# document = self . request . validated [ 'document' ] #NEWLINE# document_data = document . serialize ( 'view' ) #NEWLINE# document_data [ 'previousVersions' ] = [ i . serialize ( 'view' ) for i in self . request . validated [ 'documents' ] if ( self . url != document . url ) ] #NEWLINE# return { #NEWLINE# #INDENT# 'data' : document_data , #NEWLINE# #UNINDENT# }