Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion djangosaml2/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _set_attribute(self, obj, attr, value):
Return True if the attribute was changed and False otherwise.
"""
field = obj._meta.get_field(attr)
if len(value) > field.max_length:
if field.max_length is not None and len(value) > field.max_length:
cleaned_value = value[:field.max_length]
logger.warn('The attribute "%s" was trimmed from "%s" to "%s"',
attr, value, cleaned_value)
Expand Down