0001-saml2-fix-user-lookup-when-there-s-no-connexion-time.patch
wcs/qommon/saml2.py | ||
---|---|---|
511 | 511 |
session.name_identifier = ni |
512 | 512 |
while True: |
513 | 513 |
users = sorted(user_class.get_users_with_name_identifier(ni), |
514 |
key=lambda u: (u.last_seen, -int(u.id))) |
|
514 |
key=lambda u: (u.last_seen or 0, -int(u.id)))
|
|
515 | 515 |
if users: |
516 | 516 |
# if multiple users, use the more recently used or the younger |
517 | 517 |
user = users[-1] |
518 |
- |