From 08766d3e459370bb44d247e443da83f550723c20 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Tue, 19 Mar 2024 07:03:02 -0700 Subject: [PATCH] Update src/hdmf/container.py Co-authored-by: Ryan Ly --- src/hdmf/container.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hdmf/container.py b/src/hdmf/container.py index 708cfea80..e88bd417b 100644 --- a/src/hdmf/container.py +++ b/src/hdmf/container.py @@ -144,16 +144,16 @@ def _field_config(self, arg_name, val): warn(msg) return val else: - # From the spec, get the corresponding constructor name - constr_name = obj_mapper.get_const_arg(spec) - termset_path = os.path.join(CUR_DIR, config_namespace['data_types'][object_name][constr_name]) - termset = TermSet(term_schema_path=termset_path) # If the val has been manually wrapped then skip checking the config for the attr if type(val) == TermSetWrapper: msg = "Field value already wrapped with TermSetWrapper." warn(msg) return val else: + # From the spec, get the corresponding constructor name + constr_name = obj_mapper.get_const_arg(spec) + termset_path = os.path.join(CUR_DIR, config_namespace['data_types'][object_name][constr_name]) + termset = TermSet(term_schema_path=termset_path) val = TermSetWrapper(value=val, termset=termset) return val