From 5f948c9d6f12577f9d39f58fc0dca00f3220fbce Mon Sep 17 00:00:00 2001 From: Cody Baker Date: Tue, 4 Jun 2024 15:54:21 -0400 Subject: [PATCH] object does not mutate --- src/pyflask/manageNeuroconv/manage_neuroconv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pyflask/manageNeuroconv/manage_neuroconv.py b/src/pyflask/manageNeuroconv/manage_neuroconv.py index c3778b8f0..a322b602a 100644 --- a/src/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/src/pyflask/manageNeuroconv/manage_neuroconv.py @@ -992,9 +992,10 @@ def update_conversion_progress(message): del ecephys_metadata["ElectrodeColumns"] # Correct timezone in metadata fields - resolved_metadata["NWBFile"]["session_start_time"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"])) + resolved_metadata["NWBFile"]["session_start_time"] = resolved_metadata["NWBFile"][ + "session_start_time"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"])) if "date_of_birth" in resolved_metadata["Subject"]: - resolved_metadata["Subject"]["date_of_birth"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"])) + resolved_metadata["Subject"]["date_of_birth"] = resolved_metadata["Subject"]["date_of_birth"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"])) # Actually run the conversion converter.run_conversion(