File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,12 +103,17 @@ def ensure_dcg_exists(
103103 logger .error (f"Unknown collection type { collection_type } " )
104104 return None
105105
106- dcg_tag = "/" .join (
107- [part for part in metadata_source .parts if part != environment .visit ]
108- ).replace ("//" , "/" )
109- if session_file is None or not session_file .is_file ():
110- if session_file is not None :
111- logger .warning (f"Cannot find session file { str (session_file )} " )
106+ if session_file is None :
107+ dcg_data = {
108+ "experiment_type_id" : experiment_type_id ,
109+ "tag" : metadata_source ,
110+ }
111+ elif not session_file .is_file ():
112+ logger .warning (f"Cannot find session file { str (session_file )} " )
113+ dcg_tag = "/" .join (
114+ [part for part in metadata_source .parts if part != environment .visit ]
115+ ## problem
116+ ).replace ("//" , "/" )
112117 dcg_data = {
113118 "experiment_type_id" : experiment_type_id ,
114119 "tag" : dcg_tag ,
@@ -156,6 +161,11 @@ def ensure_dcg_exists(
156161 atlas = Path (partial_path ), sample = sample
157162 )
158163
164+ dcg_tag = "/" .join (
165+ [part for part in metadata_source .parts if part != environment .visit ]
166+ ## problem
167+ ).replace ("//" , "/" )
168+
159169 if atlas_xml_search := list (
160170 (source_visit_dir / partial_path ).parent .glob ("Atlas_*.xml" )
161171 ):
You can’t perform that action at this time.
0 commit comments