Skip to content

Commit 9337ade

Browse files
committed
value
1 parent 7cc4bca commit 9337ade

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

djangosaml2/backends.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def get_django_user_lookup_attribute(userModel) -> str:
5050
return getattr(userModel, 'USERNAME_FIELD', 'username')
5151

5252

53-
def set_attribute(obj, attr, value) -> bool:
53+
def set_attribute(obj, attr, new_value) -> bool:
5454
""" Set an attribute of an object to a specific value, if it wasn't that already.
5555
Return True if the attribute was changed and False otherwise.
5656
"""
5757

5858
old_value = getattr(obj, attr)
59-
if cleaned_value != old_value:
60-
setattr(obj, attr, cleaned_value)
59+
if new_value != old_value:
60+
setattr(obj, attr, new_value)
6161
return True
6262

6363
return False

0 commit comments

Comments
 (0)