File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ def ensure_dcg_exists(
6767
6868 if not session_file .is_file ():
6969 logger .warning (f"Cannot find session file { str (session_file )} " )
70- dcg_tag = (
71- str ( metadata_source ). replace ( f"/ { environment .visit } " , "" ). replace ( "//" , "/" )
72- )
70+ dcg_tag = "/" . join (
71+ [ part for part in metadata_source . parts if part != environment .visit ]
72+ ). replace ( "//" , "/" )
7373 dcg_data = {
7474 "experiment_type_id" : experiment_type_id ,
7575 "tag" : dcg_tag ,
@@ -122,9 +122,9 @@ def ensure_dcg_exists(
122122 atlas = Path (partial_path ), sample = sample
123123 )
124124
125- dcg_tag = (
126- str ( metadata_source ). replace ( f"/ { environment .visit } " , "" ). replace ( "//" , "/" )
127- )
125+ dcg_tag = "/" . join (
126+ [ part for part in metadata_source . parts if part != environment .visit ]
127+ ). replace ( "//" , "/" )
128128 dcg_data = {
129129 "experiment_type_id" : experiment_type_id ,
130130 "tag" : dcg_tag ,
You can’t perform that action at this time.
0 commit comments