fixed RQ issue - bg tasks now working on linux notebook
This commit is contained in:
@@ -171,9 +171,17 @@ def update_subscription(rower,data,method='up'):
|
||||
)
|
||||
|
||||
if rower.paidplan != 'coach':
|
||||
coachees = Rower.objects.filter(coach__in=[rower]).distinct()
|
||||
for coachee in coachees:
|
||||
coachee.coaches.remove(rower)
|
||||
try:
|
||||
coachgroup = coach.mycoachgroup
|
||||
except CoachingGroup.DoesNotExist:
|
||||
coachgroup = CoachingGroup()
|
||||
coachgroup.save()
|
||||
rower.mycoachgroup = coachgroup
|
||||
rower.save()
|
||||
|
||||
athletes = Rower.objects.filter(coachinggroups__in=[rower.mycoachgroup]).distinct()
|
||||
for athlete in athletes:
|
||||
athlete.coachinggroups.remove(rower.mycoachgroup)
|
||||
|
||||
if method == 'up':
|
||||
transactions = result.subscription.transactions
|
||||
|
||||
Reference in New Issue
Block a user