misc: check templates are strings (#48504)

This commit is contained in:
Frédéric Péters 2020-11-13 08:31:03 +01:00
parent b3378e553e
commit 08eb5dbdf1
1 changed files with 1 additions and 1 deletions

View File

@ -520,7 +520,7 @@ class Template(object):
@classmethod
def is_template_string(cls, string):
return string and ('{{' in string or '{%' in string or '[' in string)
return isinstance(string, str) and ('{{' in string or '{%' in string or '[' in string)
# monkey patch django template Variable resolution to convert legacy