Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Removed request_id field in sessions.py
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Verma <shivam.r.verma@seagate.com>
  • Loading branch information
Shivam Verma committed Aug 24, 2022
1 parent 6b3c4c6 commit 5526f94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions csm/core/services/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ async def login(self, user_id, password):
session = await self._is_valid_session_exists(user_id)
if not session:
# if No valid session exists, then create new session
Log.info(f"[{self.request.request_id}] Session expired, creating new session for user: {user_id}")
Log.info(f"Session expired, creating new session for user: {user_id}")
permissions = await self._role_manager.calc_effective_permissions(user.user_role)
session = await self._session_manager.create(credentials, permissions)
if not session:
Log.error(f"[{self.request.request_id}] Failed to create a new session for user: {user_id}")
Log.error(f"Failed to create a new session for user: {user_id}")
return None, None

return session.session_id, {"reset_password": user.reset_password}
Expand Down Expand Up @@ -432,4 +432,4 @@ async def _is_valid_session_exists(self, user_id: str) -> None:
await self.update_session_expiry_time(each_session)
# return valid session
return each_session
return None
return None

0 comments on commit 5526f94

Please sign in to comment.