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'
This commit is contained in:
parent
ec423a8d68
commit
25a8dcad87
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue