fix two bugs
parent
2a55277302
commit
3986124464
|
@ -643,6 +643,7 @@ class Campaign(models.Model):
|
|||
|
||||
|
||||
def update_left(self):
|
||||
self._current_total=None
|
||||
if self.type == THANKS:
|
||||
self.left == Decimal(0.00)
|
||||
elif self.type == BUY2UNGLUE:
|
||||
|
|
|
@ -16,6 +16,7 @@ def pledge_transaction(t,user,amount):
|
|||
else:
|
||||
success = user.credit.add_to_pledged(amount)
|
||||
if success:
|
||||
t.type = PAYMENT_TYPE_AUTHORIZATION
|
||||
t.max_amount=amount
|
||||
t.set_credit_approved(amount)
|
||||
return success
|
||||
|
@ -36,6 +37,7 @@ def pay_transaction(t, user, to_user, amount):
|
|||
'''user has credit, transfer it to rh account'''
|
||||
success = user.credit.transfer_to(to_user , amount)
|
||||
if success:
|
||||
t.type = PAYMENT_TYPE_INSTANT
|
||||
t.set_executed()
|
||||
return success
|
||||
|
||||
|
|
Loading…
Reference in New Issue