From d32e19c4ac74a8abc3198f584cc414e1476f8e05 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 8 Apr 2016 23:15:15 +0100 Subject: [PATCH] Fix tests --- project/blog/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/blog/views.py b/project/blog/views.py index cb2662b..6ceed9d 100644 --- a/project/blog/views.py +++ b/project/blog/views.py @@ -11,7 +11,8 @@ class BlogView(TemplateView): context['blog'] = self.blog_data context['blog']['date'] = reformat_date(self.blog_data['date']) context['html_title'] = self.blog_data['title'] - context['header_image'] = self.blog_data['featured_image'] + if 'featured_image' in self.blog_data: + context['header_image'] = self.blog_data['featured_image'] return context def dispatch(self, request, *args, **kwargs):