

def add_conference(endpoint, name, active, admins, info_url=None, logo_url=None, public_projects=None):
    try:
        admin_users = [User.find_one(Q('username', 'iexact', admin)) for admin in admins]
    except ModularOdmException:
        raise RuntimeError('Admin must be a current registered user on the OSF.')
    conf = Conference(endpoint=endpoint, name=name, active=active, info_url=info_url, logo_url=logo_url, admins=admin_users)
    try:
        conf.save()
    except ModularOdmException:
        raise RuntimeError('Conference already exists.')

dataset/ETHPy150Open CenterForOpenScience/osf.io/scripts/add_conference.py add_conference/original