Skip to content

Commit

Permalink
Hotfix: fix missing dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
edeno committed Jul 4, 2024
1 parent 08fa17c commit e395d0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spyglass/common/common_lab.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit e395d0a

Please sign in to comment.