diff --git a/sample-management-custom/caosdb-server/scripting/bin/update_containers.py b/sample-management-custom/caosdb-server/scripting/bin/update_containers.py index 44c6c73021a0b9ad400f703ac8fa95c0d087dea3..8cf819d2afad9aae2443b1db1fa31a7ff31cb689 100755 --- a/sample-management-custom/caosdb-server/scripting/bin/update_containers.py +++ b/sample-management-custom/caosdb-server/scripting/bin/update_containers.py @@ -37,7 +37,8 @@ from linkahead.cached import cached_query, cached_get_entity_by from bis_utils import (get_do_not_insert_type_names, replace_entity_urls_by_ids, whitespace_cleanup_in_df) from sample_helpers.container_update_get_parent import get_container_by_identifier -from sample_helpers.container_update_post_processing import (post_process_containers_before_sync, post_process_parent_containers_before_sync, post_process_inserts_and_updates) +from sample_helpers.container_update_post_processing import ( + post_process_containers_before_sync, post_process_parent_containers_before_sync, post_process_inserts_and_updates) from sample_helpers.utils import (CONSTANTS, get_column_header_name, get_entity_name) # suppress warning of diff function @@ -58,8 +59,6 @@ def _value_in_row(key, row): return True - - def get_parser(): par = helper.get_argument_parser() return par @@ -104,7 +103,7 @@ def main(): return 1 child.add_parent(get_entity_name("container_rt")) child_containers.append(child) - + if _value_in_row(parent_column_name, row): parent_identifier = row[parent_column_name] parent = get_container_by_identifier(parent_identifier) @@ -192,7 +191,8 @@ def main(): child.add_property(id=custom_label_prop.id, name=custom_label_prop.name, value=row[get_column_header_name("custom_label_prop")]) else: - child.get_property(custom_label_prop.id).value = row[get_column_header_name("custom_label_prop")] + child.get_property( + custom_label_prop.id).value = row[get_column_header_name("custom_label_prop")] # Treat PI if _value_in_row(get_column_header_name("PI"), row):