Commit 5dea1aec by Fábián János

AttributeError: 'str' object has no attribute 'decode'

Remove unnecessary lines
parent c6616a3f
...@@ -43,8 +43,6 @@ class Saml2Backend(Saml2BackendBase): ...@@ -43,8 +43,6 @@ class Saml2Backend(Saml2BackendBase):
match = match.group() match = match.group()
return '+%04x' % ord(match) return '+%04x' % ord(match)
if isinstance(main_attribute, str):
main_attribute = main_attribute.decode('UTF-8')
assert isinstance(main_attribute, str) assert isinstance(main_attribute, str)
attr = re.sub(r'[^\w.@-]', replace, main_attribute) attr = re.sub(r'[^\w.@-]', replace, main_attribute)
max_length = settings.SAML_MAIN_ATTRIBUTE_MAX_LENGTH max_length = settings.SAML_MAIN_ATTRIBUTE_MAX_LENGTH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment