From 97e70dd44f5a38a07d9c0a0bb3b1d27582fe0ec6 Mon Sep 17 00:00:00 2001 From: Erik Stein Date: Thu, 29 Mar 2018 17:29:42 +0200 Subject: [PATCH] Fix: Don't return "None" template name. --- content_plugins/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content_plugins/base.py b/content_plugins/base.py index 47c0190..4b3ab98 100644 --- a/content_plugins/base.py +++ b/content_plugins/base.py @@ -52,7 +52,11 @@ class BasePlugin(models.Model): renderer.register_template_renderer(cls, cls.get_template, cls.get_context_data) def get_template_names(self): - return [getattr(self, 'template_name', None)] + t = getattr(self, 'template_name', None) + if t: + return [t] + else: + return [] def get_template(self): """