only include schedule if presentation has a slot
This commit is contained in:
parent
9df85f24af
commit
97e1086b1d
1 changed files with 5 additions and 1 deletions
|
@ -145,9 +145,13 @@ def schedule_slot_edit(request, slug, slot_pk):
|
|||
def schedule_presentation_detail(request, pk):
|
||||
|
||||
presentation = get_object_or_404(Presentation, pk=pk)
|
||||
if presentation.slot:
|
||||
schedule = presentation.slot.day.schedule
|
||||
else:
|
||||
schedule = None
|
||||
|
||||
ctx = {
|
||||
"presentation": presentation,
|
||||
"schedule": presentation.slot.day.schedule,
|
||||
"schedule": schedule,
|
||||
}
|
||||
return render(request, "schedule/presentation_detail.html", ctx)
|
||||
|
|
Loading…
Reference in a new issue