#NEWLINE# def to_representation( self , obj , envelope = 'data' ) : #NEWLINE# #INDENT# data = super ( ApiOAuth2PersonalTokenSerializer , self ) . to_representation ( obj , envelope = envelope ) #NEWLINE# if ( not ( self . context [ 'request' ] . method == 'POST' ) ) : #NEWLINE# #INDENT# if ( 'data' in data ) : #NEWLINE# #INDENT# data [ 'data' ] [ 'attributes' ] . pop ( 'token_id' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data [ 'attributes' ] . pop ( 'token_id' ) #NEWLINE# #UNINDENT# #UNINDENT# return data