Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LinkAhead Sample Management
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
LinkAhead Sample Management
Commits
9a3017ae
Commit
9a3017ae
authored
4 months ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
STY: autopep8'd
parent
4c7073e3
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
F awi sams
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sample-management-custom/caosdb-server/scripting/bin/update_containers.py
+5
-5
5 additions, 5 deletions
...t-custom/caosdb-server/scripting/bin/update_containers.py
with
5 additions
and
5 deletions
sample-management-custom/caosdb-server/scripting/bin/update_containers.py
+
5
−
5
View file @
9a3017ae
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment