Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Feb 8, 2025
1 parent d1f699b commit eb41dda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/hdmf/common/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def add_ref_termset(self, **kwargs):
if len(missing_terms)>0:
return {"missing_terms": missing_terms}

def _validate_object(self, container, attribute, field):
def _validate_object(self, container, attribute, field, file):
if attribute is None: # Trivial Case
relative_path = ''
object_field = self._check_object_field(file=file,
Expand Down Expand Up @@ -588,6 +588,7 @@ def _validate_object(self, container, attribute, field):
container=parent,
relative_path=relative_path,
field=field)
return object_field


@docval({'name': 'container', 'type': (str, AbstractContainer), 'default': None,
Expand Down Expand Up @@ -676,7 +677,7 @@ def add_ref(self, **kwargs):
msg = 'This entity already exists. Ignoring new entity uri'
warn(msg, stacklevel=3)

object_field = self._validate_object(container, attribute, field)
object_field = self._validate_object(container, attribute, field, file)

#######################################
# Validate Parameters and Populate HERD
Expand Down
2 changes: 1 addition & 1 deletion src/hdmf/spec/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ def is_inherited_spec(self, **kwargs):
self.__datasets[parent_name].get_attribute(spec_name) is not None):
return True
else:
if (parent_name in self.__groups and self.is_inherited_group(parent_name) and :
if (parent_name in self.__groups and self.is_inherited_group(parent_name) and
self.__groups[parent_name].get_attribute(spec_name) is not None):
return True

Check warning on line 1061 in src/hdmf/spec/spec.py

View check run for this annotation

Codecov / codecov/patch

src/hdmf/spec/spec.py#L1061

Added line #L1061 was not covered by tests
return False
Expand Down

0 comments on commit eb41dda

Please sign in to comment.