We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72c22d9 commit b6ec61aCopy full SHA for b6ec61a
integration_tests/test_eo3_support.py
@@ -219,7 +219,7 @@ def test_undo_eo3_compatibility_del_handling() -> None:
219
assert "extent" not in doc
220
221
222
-def with_parsed_datetimes(v: dict, name=""):
+def with_parsed_datetimes(v: dict | str | datetime | list, name=""):
223
"""
224
All date fields in eo3 metadata have names ending in 'datetime'. Return a doc
225
with all of these fields parsed as actual dates.
@@ -229,7 +229,7 @@ def with_parsed_datetimes(v: dict, name=""):
229
if not v:
230
return v
231
232
- if name.endswith("datetime"):
+ if name.endswith("datetime") and isinstance(v, str | datetime):
233
dt = parse_time(v)
234
# Strip/normalise timezone to match default yaml.load()
235
if dt.tzinfo:
0 commit comments