Stops the last db_session

def stop_db_session(exc=None):
    """Stops the last db_session"""
    # print('==> Stop session', type(exc))

    if has_db_session():
        exc_type = None
        tb = None

        if exc:
            exc_type, exc, tb = get_exc_info(exc)

        db_session.__exit__(exc_type, exc, tb)