#NEWLINE# def __set__( self , obj , value ) : #NEWLINE# #INDENT# currency = getattr ( obj , self . field . get_currency_field_name ( ) ) #NEWLINE# if self . field . has_precision : #NEWLINE# #INDENT# precision = getattr ( obj , self . field . get_precision_field_name ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# precision = 0 #NEWLINE# #UNINDENT# if ( ( currency is not None ) and ( not isinstance ( value , BaseCurrency ) ) ) : #NEWLINE# #INDENT# value = currency . __class__ ( value , precision = precision ) #NEWLINE# #UNINDENT# obj . __dict__ [ self . field . name ] = currency