diff --git a/django/template/backends/dummy.py b/django/template/backends/dummy.py index 634ed32ffb..a59e10d178 100644 --- a/django/template/backends/dummy.py +++ b/django/template/backends/dummy.py @@ -35,12 +35,9 @@ class TemplateStrings(BaseEngine): Origin(template_file, template_name, self), 'Source does not exist', )) - continue - - return Template(template_code) - - else: - raise TemplateDoesNotExist(template_name, tried=tried, backend=self) + else: + return Template(template_code) + raise TemplateDoesNotExist(template_name, tried=tried, backend=self) class Template(string.Template):