Private
Public Access
1
0

fix subscription cancel webhook

This commit is contained in:
Sander Roosendaal
2021-02-09 19:05:57 +01:00
parent c63b538cb7
commit 0b1cc2403f
2 changed files with 2 additions and 1 deletions

View File

@@ -68,6 +68,8 @@ def process_webhook(notification):
subscription = notification.subscription
rs = Rower.objects.filter(subscription_id=subscription.id)
if rs.count() == 0:
with open('braintreewebhooks.log','a') as f:
f.write('Could not find rowers with subscription ID '+subscription.id+'\n')
return 0
r = rs[0]
result,mesg,errormsg = cancel_subscription(r,subscription.id)

View File

@@ -1076,7 +1076,6 @@ class CourseSelectForm(forms.Form):
manager = kwargs.pop('manager',None)
super(CourseSelectForm,self).__init__(*args,**kwargs)
if course is not None:
print('aap',course)
d_min = 0.5*course.distance
d_max = 2*course.distance
country = course.country