diff --git a/sample-management-custom/caosdb-server/scripting/bin/export_sample_csv.py b/sample-management-custom/caosdb-server/scripting/bin/export_sample_csv.py index 7311fc101929f2012269d4001904c1c34edf3f09..085c8398fbea5b4fa5ce12a5625b7ea8d0c24e29 100755 --- a/sample-management-custom/caosdb-server/scripting/bin/export_sample_csv.py +++ b/sample-management-custom/caosdb-server/scripting/bin/export_sample_csv.py @@ -355,6 +355,7 @@ EXTRACTORS = use_custom_names({ "Longitude start": extract_lng_start, "Longitude stop": extract_lng_stop, "PDFReport": extract_pdf_id, + "PI": extract_person, "Sampling method": default_find, "Sphere": extract_sphere, "Start date": extract_start_date, diff --git a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/utils.py b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/utils.py index d047e6bbfd6a39cae610526d17238d3675533447..c6b60052b2b9b4a3a8f22abb460ec3bfa5fd6bb4 100644 --- a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/utils.py +++ b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/utils.py @@ -11,7 +11,12 @@ with open(os.path.join(Path(__file__).parent, "default_constants.yml")) as yaml_ if os.path.isfile(os.path.join(Path(__file__).parent, "constants.yml")): with open(os.path.join(Path(__file__).parent, "constants.yml")) as custom_yaml_file: - CONSTANTS.update(yaml.safe_load(custom_yaml_file)) + tmp_dict = yaml.safe_load(custom_yaml_file) + for key, value in tmp_dict.items(): + if isinstance(value, dict): + CONSTANTS[key].update(value) + else: + CONSTANTS[key] = value def get_entity_name(name: str):