Skip to content
Snippets Groups Projects
Commit 3bb97b87 authored by Dylann Cordel's avatar Dylann Cordel :crossed_swords:
Browse files

fix when no news is found

parent aa04c64b
No related branches found
No related tags found
No related merge requests found
...@@ -42,8 +42,9 @@ class NewsboxBaseArchiveView(NewsboxPublishedMixinView): ...@@ -42,8 +42,9 @@ class NewsboxBaseArchiveView(NewsboxPublishedMixinView):
'title_url': '', 'title_url': '',
'newsbox_opts': self.model._newsbox_meta, 'newsbox_opts': self.model._newsbox_meta,
'date_list_period': self.date_list_period, '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 return context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment