diff --git a/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py b/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py index ace23eef4c481fdc20057fce83ef44d4c45dbca5..a786927d2ad80d9ce00ad82b756902605a420897 100755 --- a/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py +++ b/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py @@ -145,6 +145,12 @@ def update_sample_records(data, htmluserlog_public): raise DataInconsistencyError(msg) # All special properties are added here + if get_column_header_name("sample_name") in data: + # We want to allow to overwrite the name with empty + # values. Note that this is cureently broken in the + # crawler and needs to be fixed there. + sample.name = return_value_if_not_none(row[get_column_header_name("sample_name")]) + sample = add_special_properties(sample, row) # Add additional properties diff --git a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/sample_upload_column_definitions.py b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/sample_upload_column_definitions.py index 1ad1ade25e314967d38fb53faf36a781f7ff6993..3bd2b859c7f59d9143372314ff880dd49cadff50 100644 --- a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/sample_upload_column_definitions.py +++ b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/sample_upload_column_definitions.py @@ -69,6 +69,7 @@ DATATYPE_DEFINITIONS = use_custom_names({ "Longitude stop": float, "PI": str, "Parent LinkAhead ID": str, + "sample_name": str, "SampleMethod": str, "SampleType": str, "Start date": str, diff --git a/sample-management-custom/caosdb-server/scripting/bin/upload_sample_template.py b/sample-management-custom/caosdb-server/scripting/bin/upload_sample_template.py index 716000720b5a8595dd0add4a31e870c9dac7b275..db9aa64f6d6e4383f14247dd23bc2bac7ff3bf85 100755 --- a/sample-management-custom/caosdb-server/scripting/bin/upload_sample_template.py +++ b/sample-management-custom/caosdb-server/scripting/bin/upload_sample_template.py @@ -41,7 +41,7 @@ from caosadvancedtools.table_importer import CSVImporter from caoscrawler.logging import configure_server_side_logging from bis_utils import (replace_entity_urls_by_ids, - SPECIAL_TREATMENT_SAMPLE, whitespace_cleanup_in_df) + whitespace_cleanup_in_df) from sample_helpers.sample_upload_column_definitions import ( COLUMN_CONVERTER, DATATYPE_DEFINITIONS, OBLIGATORY_COLUMNS, OBLIGATORY_COLUMNS_CHILD, SPECIAL_TREATMENT_SAMPLE)