File tree Expand file tree Collapse file tree
python-packages/input4MIPs-CVs/src/input4MIPs_CVs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,21 @@ def diff_db_to_changes_comment(
115115 ],
116116 ]
117117
118+ # Workaround https://github.com/esgf2-us/esgf-1.5-design/issues/86
119+ def fix_timestamp (v : str | list | None ) -> str | None :
120+ if isinstance (v , str ) or v is None :
121+ return v
122+
123+ if isinstance (v , list ) and len (v ) == 1 :
124+ return v [0 ]
125+
126+ raise AssertionError (v )
127+
128+ if "timestamp" in summary_table_columns :
129+ diffs_incl_source_id ["timestamp" ] = [
130+ fix_timestamp (v ) for v in diffs_incl_source_id ["timestamp" ]
131+ ]
132+
118133 summary_table = (
119134 diffs_incl_source_id [summary_table_columns ]
120135 .fillna ("None" )
Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ def get_files_view(
186186 ]
187187 )
188188
189+ # Workaround https://github.com/esgf2-us/esgf-1.5-design/issues/86
189190 def fix_timestamp (v : str | list | None ) -> str | None :
190191 if isinstance (v , str ) or v is None :
191192 return v
@@ -195,7 +196,6 @@ def fix_timestamp(v: str | list | None) -> str | None:
195196
196197 raise AssertionError (v )
197198
198- # Workaround https://github.com/esgf2-us/esgf-1.5-design/issues/86
199199 if "timestamp" in col_order :
200200 db ["timestamp" ] = [fix_timestamp (v ) for v in db ["timestamp" ]]
201201
You can’t perform that action at this time.
0 commit comments