diff --git a/newsbox/views.py b/newsbox/views.py index ad7c5f7ed4583ed8aea77cf5174a7533847404ea..4dcc04da7e09919cd63f553b67a262364fde11a6 100644 --- a/newsbox/views.py +++ b/newsbox/views.py @@ -42,8 +42,9 @@ class NewsboxBaseArchiveView(NewsboxPublishedMixinView): 'title_url': '', 'newsbox_opts': self.model._newsbox_meta, 'date_list_period': self.date_list_period, - 'current_date': context['object_list'].first().newsbox_publication_start_date }) + if context['object_list']: + context['current_date'] = context['object_list'][0].newsbox_publication_start_date return context