#NEWLINE# def hydrate( self , bundle ) : #NEWLINE# #INDENT# value = super ( DecimalField , self ) . hydrate ( bundle ) #NEWLINE# if ( value and ( not isinstance ( value , Decimal ) ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# value = Decimal ( value ) #NEWLINE# #UNINDENT# except decimal . InvalidOperation : #NEWLINE# #INDENT# raise ApiFieldError ( ( "Invalid decimal string for '%s' field: '%s'" % ( self . instance_name , value ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return value