2
0
Fork 0

fix: display text after shift draw

This commit is contained in:
Andreas (@xAndy) Zimmermann 2023-05-15 16:31:55 +02:00
parent 8d4a3907e4
commit a1c1e93ef7
1 changed files with 3 additions and 3 deletions

View File

@ -16,15 +16,15 @@ def my_fallback_shifts(request, team_member_id):
team_member = get_object_or_404(TeamMember, pk=team_member_id) team_member = get_object_or_404(TeamMember, pk=team_member_id)
after_draw = False is_draw = False
if request.method == "POST": if request.method == "POST":
form = EmptyForm(request.POST) form = EmptyForm(request.POST)
if form.is_valid(): if form.is_valid():
team_member.assign_random_shifts() team_member.assign_random_shifts()
after_draw = True is_draw = True
context = { context = {
"team_member": team_member, "team_member": team_member,
"shifts": team_member.fallback_shifts.order_by("start_at").all(), "shifts": team_member.fallback_shifts.order_by("start_at").all(),
"after_draw": after_draw, "is_draw": is_draw,
} }
return render(request, "my_fallback_shifts.html", context) return render(request, "my_fallback_shifts.html", context)