Skip to content

Commit

Permalink
add custom html field generation method for timeseries
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Jan 24, 2024
1 parent dfc19bd commit 4468878
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pynwb/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ def __get_links(self, links):
def __add_link(self, links_key, link):
self.fields.setdefault(links_key, list()).append(link)

def _generate_field_html(self, key, value, level, access_code):
# reassign value if linked timestamp or linked data to avoid recursion error
if key in ['timestamp_link', 'data_link']:
value = {v.name: v.neurodata_type for v in value}

return super()._generate_field_html(key, value, level, access_code)

Check warning on line 295 in src/pynwb/base.py

View check run for this annotation

Codecov / codecov/patch

src/pynwb/base.py#L295

Added line #L295 was not covered by tests

@property
def time_unit(self):
return self.__time_unit
Expand Down

0 comments on commit 4468878

Please sign in to comment.