Browse Source

Fix UserNotFound exception for expiring groups

Without this patch, if this exception is reached, it won't be properly
formed and will result in a log message like this:

  Failed to insert replacement values into translated message Could not
  find user: %(user_id)s. (Original: 'Could not find user:
  %(user_id)s.'): 'user_id'

This patch adds the right parameters to ensure the exception properly
logs the user ID and the translation doesn't fail.

Change-Id: I3229d9a237633cda8f6a25f396a75b8310757d9d
changes/29/726729/1
Colleen Murphy 1 year ago
parent
commit
2d26a87229
  1. 2
      keystone/identity/shadow_backends/sql.py

2
keystone/identity/shadow_backends/sql.py

@ -230,7 +230,7 @@ class ShadowUsers(base.ShadowUsersDriverBase):
if not user:
# Note(knikolla): This shouldn't really ever happen, since
# this requires the user to already be logged in.
raise exception.UserNotFound()
raise exception.UserNotFound(user_id=user_id)
return user
with sql.session_for_write() as session:

Loading…
Cancel
Save