diff --git a/pinaxcon/templates/symposion/schedule/presentation_detail.html b/pinaxcon/templates/symposion/schedule/presentation_detail.html index e91421be..e6ecf940 100644 --- a/pinaxcon/templates/symposion/schedule/presentation_detail.html +++ b/pinaxcon/templates/symposion/schedule/presentation_detail.html @@ -8,7 +8,13 @@ {% block head_title %}Presentation: {{ presentation.title }}{% endblock %} {% block page_title %}{{ presentation.title }}{% endblock %} -{% block page_lead %}{{ presentation.slot.rooms.0 }} | {{ presentation.slot.day.date|date:"D d M" }} | {{ presentation.slot.start}}–{{ presentation.slot.end }}{% endblock %} +{% block page_lead %} +{% if presentation.slot %} +{{ presentation.slot.rooms.0 }} | {{ presentation.slot.day.date|date:"D d M" }} | {{ presentation.slot.start }}–{{ presentation.slot.end }} +{% else %} +Not currently scheduled. +{% endif %} +{% endblock %} {% block content %} {% if presentation.unpublish %} diff --git a/vendor/symposion/schedule/views.py b/vendor/symposion/schedule/views.py index 99f3bf2c..275b9bf5 100644 --- a/vendor/symposion/schedule/views.py +++ b/vendor/symposion/schedule/views.py @@ -186,12 +186,15 @@ def schedule_presentation_detail(request, pk): presentation = get_object_or_404(Presentation, pk=pk) + schedule = None if presentation.slot: # 1) Schedule from presentation's slot schedule = presentation.slot.day.schedule else: # 2) Fall back to the schedule for this proposal - schedule = presentation.proposal.kind.section.schedule + section = presentation.proposal.kind.section + if hasattr(section, 'schedule'): + schedule = presentation.proposal.kind.section.schedule if not request.user.is_staff: # 3) Is proposal unpublished?