File pr_197.patch of Package python-social-auth-app-django

From f8d674d9ac2da7683ff902a58d514ea5d1eb5b7b Mon Sep 17 00:00:00 2001
From: John Vandenberg <jayvdb@gmail.com>
Date: Wed, 10 Apr 2019 20:08:38 +0700
Subject: [PATCH] Fix render_html on Django 2.2

Update render_html to also catch TypeError.

Fixes https://github.com/python-social-auth/social-app-django/issues/196
---
 social_django/strategy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/social_django/strategy.py b/social_django/strategy.py
index 1a3a820a..b706afb4 100644
--- a/social_django/strategy.py
+++ b/social_django/strategy.py
@@ -97,7 +97,7 @@ def render_html(self, tpl=None, html=None, context=None):
         try:
             template = loader.get_template(tpl)
             return template.render(context=context, request=self.request)
-        except TemplateDoesNotExist:
+        except (TypeError, TemplateDoesNotExist):
             return render_template_string(self.request, html, context)
 
     def authenticate(self, backend, *args, **kwargs):
openSUSE Build Service is sponsored by