Merge branch 'master' of someserver.de:k4ever

This commit is contained in:
TKroenert 2011-03-05 01:37:43 +01:00
commit 2348a8496c
1 changed files with 3 additions and 2 deletions

View File

@ -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()