@staticmethod
def handle_session(session, exc=None):
    """
        rolls back the session if appropriate.

        :param Session session: The session in use.
        :param Exception exc: The exception raised,
            If an exception was raised, else None
        """
    if exc:
        session.rollback()
