From 34ca9d735f48b445239a93a62d5300ceafbd74e8 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Thu, 14 Aug 2014 14:14:15 +0200 Subject: [PATCH] handle the case when authorized_scopes have null value --- authentic2_idp_oauth2/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentic2_idp_oauth2/views.py b/authentic2_idp_oauth2/views.py index 1fb0369..9e1c686 100644 --- a/authentic2_idp_oauth2/views.py +++ b/authentic2_idp_oauth2/views.py @@ -90,7 +90,7 @@ class Authorize(Authorize): def get_authorization_form(self, request, client, data, client_data): automatic_grant = app_settings.AUTOMATIC_GRANT - if hasattr(client, 'a2client'): + if hasattr(client, 'a2client') and client.a2client.authorized_scopes: client_scopes = client.a2client.authorized_scopes.split(' ') automatic_grant += ((client.url, client_scopes),) -- 2.1.0.rc1