diff --git a/awx/api/serializers.py b/awx/api/serializers.py index d616d6bb9f..72e86b5cf9 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -925,7 +925,8 @@ class UserSerializer(BaseSerializer): if new_password: obj.set_password(new_password) obj.save(update_fields=['password']) - UserSessionMembership.clear_session_for_user(obj) + if self.context['request'].user != obj: + UserSessionMembership.clear_session_for_user(obj) elif not obj.password: obj.set_unusable_password() obj.save(update_fields=['password'])