From 25a8dcad877c0ffd357f38a714121781a49eb4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Kalliom=C3=A4ki?= Date: Fri, 13 Nov 2015 17:22:27 +0200 Subject: [PATCH] Prevents blog plugin from crashing when there is no app_config present Without this commit crashes with error: 'NoneType' object has no attribute 'template_prefix' --- djangocms_blog/cms_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/cms_plugins.py b/djangocms_blog/cms_plugins.py index aab204a..26bf300 100644 --- a/djangocms_blog/cms_plugins.py +++ b/djangocms_blog/cms_plugins.py @@ -16,7 +16,7 @@ class BlogPlugin(CMSPluginBase): module = 'Blog' def get_render_template(self, context, instance, placeholder): - if instance.app_config.template_prefix: + if instance.app_config and instance.app_config.template_prefix: return os.path.join(instance.app_config.template_prefix, self.base_render_template) else: return os.path.join('djangocms_blog', self.base_render_template)