django-saml2-auth
django-saml2-auth copied to clipboard
Use get_by_natural_key() instead of get()
We use email
instead of username
as our natural key. The library should get the user using the value nominated by User.USERNAME_FIELD
.
Good catch! Since this method has backward compatibility issues for old django version, could you get a chance to add try-catch for this method? So we try get_by_natural_key first, then fallback to get when specific exception happens.
@fangli Done!