parameters: ()
docstring: Adds new profile in the database.
docstring_summary: Adds new profile in the database.
docstring_tokens: Adds new profile in the database .
function: 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})
function_tokens: 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 } )