Пример #1
0
def update_sample(sample_id, data_dict):
    """
    Updates sample.

    Args:
        sample_id ([type]): [description]
        sample_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"blSampleId": sample_id}
    return db.update_db_item(models.BLSample, schemas.sample.ma_schema,
                             id_dict, data_dict)
Пример #2
0
def update_dewar(dewar_id, data_dict):
    """
    Updates dewar.

    Args:
        dewar_id ([type]): [description]
        dewar_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"dewarId": dewar_id}
    return db.update_db_item(models.Dewar, schemas.dewar.ma_schema, id_dict,
                             data_dict)
Пример #3
0
def update_person(person_id, data_dict):
    """
    Updates person.

    Args:
        person_id ([type]): [description]
        person_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"personId": person_id}
    return db.update_db_item(models.Person, schemas.person.ma_schema, id_dict,
                             data_dict)
Пример #4
0
def update_proposal(proposal_id, data_dict):
    """
    Updates proposal.

    Args:
        proposal_id ([type]): [description]
        proposal_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"proposalId": proposal_id}
    return db.update_db_item(models.Proposal, schemas.proposal.ma_schema,
                             id_dict, data_dict)
Пример #5
0
def update_lab_contact(lab_contact_id, data_dict):
    """
    Updates lab contact.

    Args:
        lab_contact_id (int): [description]
        data_dict (dict): [description]

    Returns:
       dict: [description]
    """
    id_dict = {"labContactId": lab_contact_id}
    return db.update_db_item(models.LabContact, schemas.lab_contact.ma_schema,
                             id_dict, data_dict)
Пример #6
0
def update_laboratory(laboratory_id, data_dict):
    """
    Updates laboratory db item.

    Args:
        laboratory_id ([type]): [description]
        data_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"laboratoryId": laboratory_id}
    return db.update_db_item(models.Laboratory, schemas.laboratory.ma_schema,
                             id_dict, data_dict)
Пример #7
0
def update_container(container_id, data_dict):
    """
    Updates container.

    Args:
        container_id ([type]): [description]
        container_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"containerId": container_id}
    return db.update_db_item(models.Container, schemas.container.ma_schema,
                             id_dict, data_dict)
Пример #8
0
def update_crystal(crystal_id, data_dict):
    """
    Updates crystal.

    Args:
        crystal_id ([type]): [description]
        crystal_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"crystalId": crystal_id}
    return db.update_db_item(models.Crystal, schemas.crystal.ma_schema,
                             id_dict, data_dict)
Пример #9
0
def update_motion_correction(motion_correction_id, data_dict):
    """
    Updates motion_correction.

    Args:
        motion_correction_id ([type]): [description]
        motion_correction_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"motionCorrectionId": motion_correction_id}
    return db.update_db_item(
        models.MotionCorrection, schemas.motion_correction.ma_schema, id_dict, data_dict
    )
Пример #10
0
def update_shipment(shipment_id, data_dict):
    """
    Updates shipment.

    Args:
        shipment_id ([type]): [description]
        shipment_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"shippingId": shipment_id}
    return db.update_db_item(
        models.Shipping, schemas.shipping.ma_schema, id_dict, data_dict
    )
Пример #11
0
def update_beamline_setup(beamline_setup_id, data_dict):
    """
    Updates beamline_setup.

    Args:
        beamline_setup_id ([type]): [description]
        beamline_setup_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"beamLineSetupId": beamline_setup_id}
    return db.update_db_item(models.BeamLineSetup,
                             schemas.beamline_setup.ma_schema, id_dict,
                             data_dict)
Пример #12
0
def update_robot_action(robot_action_id, data_dict):
    """
    Updates robot_action.

    Args:
        robot_action_id ([type]): [description]
        robot_action_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"robotActionId": robot_action_id}
    return db.update_db_item(models.RobotAction,
                             schemas.robot_action.ma_schema, id_dict,
                             data_dict)
Пример #13
0
def update_diffraction_plan(diffraction_plan_id, data_dict):
    """
    Updates diffraction_plan.

    Args:
        diffraction_plan_id ([type]): [description]
        diffraction_plan_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"diffractionPlanId": diffraction_plan_id}
    return db.update_db_item(models.DiffractionPlan,
                             schemas.diffraction_plan.ma_schema, id_dict,
                             data_dict)
Пример #14
0
def update_beam_calendar(beam_calendar_id, data_dict):
    """
    Updates beam_calendar.

    Args:
        beam_calendar_id ([type]): [description]
        beam_calendar_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"beamCalendarId": beam_calendar_id}
    return db.update_db_item(
        models.BeamCalendar, schemas.beam_calendar.ma_schema, id_dict, data_dict
    )
Пример #15
0
def update_session(session_id, data_dict):
    """
    Updates session.

    Args:
        session_id ([type]): [description]
        session_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"sessionId": session_id}
    return db.update_db_item(
        models.BLSession, schemas.session.ma_schema, id_dict, data_dict
    )
Пример #16
0
def update_component_type(component_type_id, data_dict):
    """
    Updates component_type.

    Args:
        component_type_id ([type]): [description]
        data_dict ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"componentTypeId": component_type_id}
    return db.update_db_item(
        models.ComponentType, schemas.component_type.ma_schema, id_dict, data_dict
    )