Commits

Dan Connolly committed 3b56fac

balance method returns a Decimal

Comments (0)

Files changed (1)

+from decimal import Decimal
 from django.db import models, connection
 
 class Account(models.Model):
 	""" % tables
 	cursor.execute(cmd, (self.id, when))
 	balrow = cursor.fetchone()
-	return balrow[0] or 0
+	return Decimal("%f" % (balrow[0] or 0))
 
     class Admin:
         pass