Esempio n. 1
0
def create(command):
    client = cms.create(command, base_class, field_shorts, field_names, field_modifiers, session)
    phone = " ".join(cms.get_parameter_cmd(command, "-ph"))
    print(phone)
    cmd = ("cc -pt client -pi "+str(client._id)[2:]+" -t phone -c "+phone).split(' ');
    print(cmd)
    try:
        contacts_.create(cmd)
    except:
        print("Error adding client! Message: %s. Please, check your input." % sys.exc_info()[1])
        client.delete()
Esempio n. 2
0
def create(command):
    worker = cms.create(command, base_class, field_shorts, field_names,
                        field_modifiers)
    phone = " ".join(cms.get_parameter_cmd(command, "-ph"))
    #print(phone)
    cmd = ("cc -ps worker -pi " + str(worker.id) + " -t phone -c " +
           phone).split(' ')
    #print(cmd)
    try:
        contacts_.create(cmd)
    except:
        print("Error adding worker! Message: %s. Please, check your input." %
              sys.exc_info()[1])
        with db_session:
            worker.delete()
Esempio n. 3
0
def create(command):
    cms.create(command, base_class, field_shorts, field_names, field_modifiers,
               session)
Esempio n. 4
0
def create(command):
    new_ds = cms.create(command, base_class, field_shorts, field_names, field_modifiers)
    if cms.get_parameter_cmd(command, extra_field_shorts[0]) != None:
        set_date_states(new_ds.id, extra_field_modifiers[0](" ".join(cms.get_parameter_cmd(command, extra_field_shorts[0]) ) ) )
Esempio n. 5
0
def create(command):
    new_request = cms.create(command, base_class, field_shorts, field_names, field_modifiers)
    set_holdings(new_request.id, extra_field_modifiers[0](" ".join(cms.get_parameter_cmd(command, extra_field_shorts[0]) ) ) )
Esempio n. 6
0
def create(command):
    new_qualification = cms.create(command, base_class, field_shorts,
                                   field_names, field_modifiers)
    set_rendered_services(
        new_qualification.id, extra_field_modifiers[0](" ".join(
            cms.get_parameter_cmd(command, extra_field_shorts[0]))))