fix: display text after shift draw

pull/1/head
parent 8d4a3907e4
commit a1c1e93ef7

@ -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)

Loading…
Cancel
Save