gbmodel/model_sqlalchemy.py
def remove_session(self, session_id):
        """
        Removes an entire session with all the teams and students
        Input: session id
        """
        try:
            team = teams()
            session_teams = team.query.filter_by(session_id=session_id).all()
            del_session = capstone_session.query.filter(capstone_session.id == session_id).first()
            for t in session_teams:
                team_name = t.name
                team.remove_team_from_session(team_name, session_id)
            db.session.delete(del_session)
            db.session.commit()
            return True
        except exc.SQLAlchemyError:
            handle_exception()
            return None

        Removes an entire session with all the teams and students
        Input: session id
        
Removes an entire session with all the teams and students
Input: session id
Removes an entire session with all the teams and students Input : session id
def remove_session(self, session_id):
        try:
            team = teams()
            session_teams = team.query.filter_by(session_id=session_id).all()
            del_session = capstone_session.query.filter(capstone_session.id == session_id).first()
            for t in session_teams:
                team_name = t.name
                team.remove_team_from_session(team_name, session_id)
            db.session.delete(del_session)
            db.session.commit()
            return True
        except exc.SQLAlchemyError:
            handle_exception()
            return None
def remove_session ( self , session_id ) : try : team = teams ( ) session_teams = team . query . filter_by ( session_id = session_id ) . all ( ) del_session = capstone_session . query . filter ( capstone_session . id == session_id ) . first ( ) for t in session_teams : team_name = t . name team . remove_team_from_session ( team_name , session_id ) db . session . delete ( del_session ) db . session . commit ( ) return True except exc . SQLAlchemyError : handle_exception ( ) return None
Removes an entire session with all the teams and students
Input: session id
Removes an entire session with all the teams and students Input : session id
"""
        Removes an entire session with all the teams and students
        Input: session id
        """
self
session_id