backends: accept being called with None as saml_attributes (#36330)

This commit is contained in:
Frédéric Péters 2019-09-22 12:30:41 +02:00
parent 6bd7ca5277
commit fd409d6d3c
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ from . import utils
class SAMLBackend(ModelBackend):
def authenticate(self, request=None, **credentials):
saml_attributes = credentials.get('saml_attributes')
saml_attributes = credentials.get('saml_attributes') or {}
# without an issuer we can do nothing
if 'issuer' not in saml_attributes:
return