Private
Public Access
1
0

updated models to add paid plan complexity

This commit is contained in:
Sander Roosendaal
2018-12-19 09:25:28 +01:00
parent 75261118c2
commit 0b79b0de98
4 changed files with 82 additions and 23 deletions

View File

@@ -42,11 +42,11 @@ def get_client_token(rower):
def get_plans_costs():
plans = gateway.plan.all()
localplans = PaidPlan.object.all()
localplans = PaidPlan.object.filter(paymentprocessor='braintree')
for plan in localplans:
for btplan in btplans:
if int(btplan.id) == plan.braintree_id:
if int(btplan.id) == plan.external_id:
plan.price = float(x)
plan.save()