fix: display text after shift draw
This commit is contained in:
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)
|
||||
|
||||
after_draw = False
|
||||
is_draw = False
|
||||
if request.method == "POST":
|
||||
form = EmptyForm(request.POST)
|
||||
if form.is_valid():
|
||||
team_member.assign_random_shifts()
|
||||
after_draw = True
|
||||
is_draw = True
|
||||
context = {
|
||||
"team_member": team_member,
|
||||
"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)
|
||||
|
|
Loading…
Reference in New Issue