From 1f5f82d08d25b333d635af4ad17d7cd7f7e355a3 Mon Sep 17 00:00:00 2001 From: seba Date: Sat, 5 Mar 2011 01:17:12 +0100 Subject: [PATCH] deposit purchase fix --- k4ever/buyable/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/k4ever/buyable/models.py b/k4ever/buyable/models.py index 7eafee7..d7f0804 100644 --- a/k4ever/buyable/models.py +++ b/k4ever/buyable/models.py @@ -84,7 +84,8 @@ class Purchase(models.Model): def create(order, buyable, isDeposit=False): p = Purchase() p.order = order - if isDeposit: + p.isDeposit = isDeposit + if p.isDeposit: p.price = buyable.deposit else: p.price = buyable.price @@ -94,7 +95,7 @@ class Purchase(models.Model): return p def __unicode__(self): - return "%s%s, %s" % (self.buyable.name, self.isDeposit and " (deposit)" or "", self.price) + return "%s%s" % (self.buyable.name, (self.isDeposit and " (deposit)" or "")) # def save(self, *args, **kwargs): # profile = self.user.get_profile()