Resolved MRN-576

Change-Id: Idafc987bdc847c39571df07240a62bebd2328703
This commit is contained in:
Serg Melikyan 2013-07-16 11:22:41 +04:00
parent 2d5256783a
commit fd50d5105a

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))
@ -98,6 +103,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))