#NEWLINE# def create_team( params ) : #NEWLINE# #INDENT# "\n    Directly inserts team into the database. Assumes all fields have been validated.\n\n    Args:\n        team_name: Name of the team\n        school: Name of the school\n        password: Team's password\n        eligible: the teams eligibility\n    Returns:\n        The newly created team id.\n    " #NEWLINE# db = api . common . get_conn ( ) #NEWLINE# if ( ( not shell_accounts_available ( ) ) and api . config . enable_shell ) : #NEWLINE# #INDENT# raise SevereInternalException ( 'There are no shell accounts available.' ) #NEWLINE# #UNINDENT# params [ 'tid' ] = api . common . token ( ) #NEWLINE# params [ 'size' ] = 0 #NEWLINE# db . teams . insert ( params ) #NEWLINE# if api . config . enable_shell : #NEWLINE# #INDENT# assign_shell_account ( db [ 'tid' ] ) #NEWLINE# #UNINDENT# return params [ 'tid' ]