()
Adds new profile in the database.
Adds new profile in the database.
Adds new profile in the database .
def on_add_profile():
    '''Adds new profile in the database.'''
    max_profile_id = DB.session.query(Profiles).count()+1
    DB.session.add(Profiles(name='New Profile %s' % max_profile_id,
                           description = 'New Profile %s' % max_profile_id,
                           c_offset=8,
                           c_threshold=90,
                           t_threshold=40))
    DB.session.commit()
    on_set_profile(data={ 'profile': 'New Profile %s' % max_profile_id})
def on_add_profile ( ) : max_profile_id = DB . session . query ( Profiles ) . count ( ) + 1 DB . session . add ( Profiles ( name = 'New Profile %s' % max_profile_id , description = 'New Profile %s' % max_profile_id , c_offset = 8 , c_threshold = 90 , t_threshold = 40 ) ) DB . session . commit ( ) on_set_profile ( data = { 'profile' : 'New Profile %s' % max_profile_id } )