#NEWLINE# def deserialize( self , template ) : #NEWLINE# #INDENT# ' Deserialize default provision request options to form initials ' #NEWLINE# serializer_class = self . get_serializer_class ( ) #NEWLINE# serializer = serializer_class ( ) #NEWLINE# data = { k : v for ( k , v ) in template . options . items ( ) if v } #NEWLINE# try : #NEWLINE# #INDENT# return serializer . to_internal_value ( data ) #NEWLINE# #UNINDENT# except serializers . ValidationError as e : #NEWLINE# #INDENT# for error_field in e . detail : #NEWLINE# #INDENT# if ( error_field in data ) : #NEWLINE# #INDENT# del data [ error_field ] #NEWLINE# #UNINDENT# #UNINDENT# return serializer . to_internal_value ( data )