#NEWLINE# def hydrate_m2m( self , bundle ) : #NEWLINE# #INDENT# if self . readonly : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if ( bundle . data . get ( self . instance_name ) is None ) : #NEWLINE# #INDENT# if self . blank : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# if self . null : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# raise ApiFieldError ( ( "The '%s' field has no data and doesn't allow a null value." % self . instance_name ) ) #NEWLINE# #UNINDENT# kwargs = { #NEWLINE# #INDENT# 'request' : bundle . request , #NEWLINE# #UNINDENT# } #NEWLINE# if self . related_name : #NEWLINE# #INDENT# kwargs [ 'related_obj' ] = bundle . obj #NEWLINE# kwargs [ 'related_name' ] = self . related_name #NEWLINE# #UNINDENT# return [ self . build_related_resource ( value , ** self ) for value in bundle . data . get ( self . instance_name ) if ( value is not None ) ]