#NEWLINE# def convert_values( self , value , field ) : #NEWLINE# #INDENT# 'Coerce the value returned by the database backend into a consistent type that\n        is compatible with the field type.\n        ' #NEWLINE# internal_type = field . get_internal_type ( ) #NEWLINE# if ( internal_type == 'DecimalField' ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( internal_type and internal_type . endswith ( 'IntegerField' ) ) or ( internal_type == 'AutoField' ) ) : #NEWLINE# #INDENT# return int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( internal_type in ( 'DateField' , 'DateTimeField' , 'TimeField' ) ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return float ( value )