email login, fixing bulk
This commit is contained in:
@@ -2035,8 +2035,9 @@ def workouts_bulk_actions(request):
|
||||
assignchoices = AssignChoices(request.POST)
|
||||
if assignchoices.is_valid():
|
||||
remove_workout = assignchoices.cleaned_data['remove_workout']
|
||||
rowers = assignchoices.cleaned_data['destination']
|
||||
rowers = assignchoices.cleaned_data['rowers']
|
||||
_ = myqueue(queuehigh, handle_assignworkouts, workouts, rowers, remove_workout)
|
||||
messages.info(request, "Your action will be performed in the background. It may take a few minutes to complete")
|
||||
url = reverse('workouts_view')
|
||||
return HttpResponseRedirect(url)
|
||||
else: # pragma: no cover
|
||||
@@ -2049,10 +2050,10 @@ def workouts_bulk_actions(request):
|
||||
actionform.fields["action"].initial = action
|
||||
assignchoices = AssignChoices()
|
||||
teams = Team.objects.filter(manager=request.user)
|
||||
assignchoices.fields["destination"].queryset = Rower.objects.filter(
|
||||
assignchoices.fields["rowers"].queryset = Rower.objects.filter(
|
||||
team__in=teams
|
||||
).distinct().order_by("user__last_name", "user__first_name").exclude(rowerplan='freecoach')
|
||||
assignchoices.fields["destination"].initial = []
|
||||
assignchoices.fields["rowers"].initial = []
|
||||
form = WorkoutMultipleCompareForm()
|
||||
form.fields["workouts"].queryset = Workout.objects.filter(id__in=[w.id for w in workouts])
|
||||
form.fields["workouts"].initial = workouts
|
||||
|
||||
Reference in New Issue
Block a user