Skip to content

Commit

Permalink
make sure session, current_user defined
Browse files Browse the repository at this point in the history
  • Loading branch information
raghuramg committed Nov 28, 2023
1 parent 1f4c614 commit 17c19d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/event_source/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ def build_command_event(event_key, options = {})

def user_session_details
@user_session_details = {}
@user_session_details[:user_id] = current_user.id if current_user
@user_session_details[:user_id] = current_user.id if defined? current_user
@user_session_details[:session_details] = {
portal: session[:portal],
person_id: session[:person_id],
id: session.id
} if session
} if defined? session

@user_session_details
end
Expand Down

0 comments on commit 17c19d8

Please sign in to comment.