'before get method for session type detail
:param data:
:param view_kwargs:
:return:'

def before_get_object(self, view_kwargs):

    if view_kwargs.get('session_id'):
        session = safe_query(self, Session, 'id', view_kwargs['session_id'], 'session_id')
        if session.session_type_id:
            view_kwargs['id'] = session.session_type_id
        else:
            view_kwargs['id'] = None
