src/server/server.py
def on_add_race_class():
    '''Adds the next available pilot id number in the database.'''
    new_race_class = Database.RaceClass(name='New class', format_id=0, cacheStatus=Results.CacheStatus.INVALID)
    DB.session.add(new_race_class)
    DB.session.flush()
    DB.session.refresh(new_race_class)
    new_race_class.name = ''
    new_race_class.description = ''
    DB.session.commit()

    Events.trigger(Evt.CLASS_ADD, {
        'class_id': new_race_class.id,
        })

    logger.info('Class added: Class {0}'.format(new_race_class))
    emit_class_data()
    emit_heat_data()
Adds the next available pilot id number in the database.
Adds the next available pilot id number in the database.
Adds the next available pilot id number in the database .
def on_add_race_class():
    new_race_class = Database.RaceClass(name='New class', format_id=0, cacheStatus=Results.CacheStatus.INVALID)
    DB.session.add(new_race_class)
    DB.session.flush()
    DB.session.refresh(new_race_class)
    new_race_class.name = ''
    new_race_class.description = ''
    DB.session.commit()
    Events.trigger(Evt.CLASS_ADD, {
        'class_id': new_race_class.id,
        })
    logger.info('Class added: Class {0}'.format(new_race_class))
    emit_class_data()
    emit_heat_data()
def on_add_race_class ( ) : new_race_class = Database . RaceClass ( name = 'New class' , format_id = 0 , cacheStatus = Results . CacheStatus . INVALID ) DB . session . add ( new_race_class ) DB . session . flush ( ) DB . session . refresh ( new_race_class ) new_race_class . name = '' new_race_class . description = '' DB . session . commit ( ) Events . trigger ( Evt . CLASS_ADD , { 'class_id' : new_race_class . id , } ) logger . info ( 'Class added: Class {0}' . format ( new_race_class ) ) emit_class_data ( ) emit_heat_data ( )
Adds the next available pilot id number in the database.
Adds the next available pilot id number in the database .
'''Adds the next available pilot id number in the database.'''