#NEWLINE# def get_object( self ) : #NEWLINE# #INDENT# value = self . kwargs . get ( 'pk' ) #NEWLINE# if ( value and ( not value . isdigit ( ) ) ) : #NEWLINE# #INDENT# if self . addon_id_pattern . match ( value ) : #NEWLINE# #INDENT# self . lookup_field = 'guid' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . lookup_field = 'slug' #NEWLINE# #UNINDENT# self . kwargs . update ( { #NEWLINE# #INDENT# 'pk' : None , #NEWLINE# self . lookup_field : self , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return super ( AddonViewSet , self ) . get_object ( )