Merge "Resolved MRN-576"

This commit is contained in:
Jenkins 2013-07-16 09:30:45 +00:00 committed by Gerrit Code Review
commit afb610d72b

View File

@ -48,6 +48,11 @@ class Controller(object):
unit = get_session()
session = unit.query(Session).get(session_id)
if session is None:
log.error('Session <SessionId {0}> is not found'
''.format(session_id))
raise exc.HTTPNotFound()
if session.environment_id != environment_id:
log.error('Session <SessionId {0}> is not tied with Environment '
'<EnvId {1}>'.format(session_id, environment_id))
@ -103,6 +108,11 @@ class Controller(object):
unit = get_session()
session = unit.query(Session).get(session_id)
if session is None:
log.error('Session <SessionId {0}> is not found'
''.format(session_id))
raise exc.HTTPNotFound()
if session.environment_id != environment_id:
log.error('Session <SessionId {0}> is not tied with Environment '
'<EnvId {1}>'.format(session_id, environment_id))