Private
Public Access
1
0

athlete edit permissions in place

This commit is contained in:
Sander Roosendaal
2019-02-16 10:31:47 +01:00
parent 259d6f28bb
commit 6afde11b7c
8 changed files with 121 additions and 13 deletions

View File

@@ -167,6 +167,11 @@ def update_subscription(rower,data,method='up'):
l = rower.user.last_name,
)
if rower.paidplan != 'coach':
coachees = Rower.objects.filter(coach__in=[rower]).distinct()
for coachee in coachees:
coachee.coaches.remove(rower)
if method == 'up':
transactions = result.subscription.transactions