#NEWLINE# def set_parent_object( self , attachment , instance , name ) : #NEWLINE# #INDENT# if ( self == 'relationships' ) : #NEWLINE# #INDENT# attachment [ 'from_content_object' ] = instance #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'inverserelationships' ) : #NEWLINE# #INDENT# attachment [ 'to_content_object' ] = instance #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# super ( RelatedModelSerializer , self ) . set_parent_object ( attachment , instance , name )