From e395d0ab80bf5d2115ba8d3d68598891fd0b2b47 Mon Sep 17 00:00:00 2001 From: Eric Denovellis Date: Wed, 3 Jul 2024 18:25:24 -0700 Subject: [PATCH] Hotfix: fix missing dicts --- src/spyglass/common/common_lab.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spyglass/common/common_lab.py b/src/spyglass/common/common_lab.py index 57acb780c..44be5f4b2 100644 --- a/src/spyglass/common/common_lab.py +++ b/src/spyglass/common/common_lab.py @@ -1,7 +1,6 @@ """Schema for institution, lab team/name/members. Session-independent.""" import datajoint as dj - from spyglass.utils import SpyglassMixin, logger from ..utils.nwb_helper_fn import get_nwb_file @@ -53,6 +52,7 @@ def insert_from_nwbfile(cls, nwbf, config=None): Dictionary read from a user-defined YAML file containing values to replace in the NWB file. """ + config = config or dict() if isinstance(nwbf, str): nwb_file_abspath = Nwbfile.get_abs_path(nwbf, new_file=True) nwbf = get_nwb_file(nwb_file_abspath) @@ -261,6 +261,7 @@ def insert_from_nwbfile(cls, nwbf, config=None): institution_name : string The name of the institution found in the NWB or config file, or None. """ + config = config or dict() inst_list = config.get("Institution", [{}]) if len(inst_list) > 1: logger.info(