Commits

Ian George committed eeb4910

rew

Comments (0)

Files changed (1)

quiet/shop/models/order.py

+from decimal import *
+
 import django.dispatch
 
 from django.db import models
         status = OrderStatus(order=ordr, status='new', comments='Order complete and ready for processing')
         status.save()
 
+    if not ordr.balance:
+        ordr.balance = Decimal(0)
+
     for payment in ordr.payments.all():
         if payment.amount:
             ordr.balance -= payment.amount