Skip to content

Commit

Permalink
Re-order if statement to avoid error in non-ptp test
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbray32 committed Oct 24, 2023
1 parent eb4f006 commit 44f0b87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spikegadgets_to_nwb/convert_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def add_position(
name="behavior", description="Contains all behavior-related data"
)
# get epoch data to seperate dio timestamps into epochs
if not (len(nwb_file.epochs) or (ptp_enabled)):
if (not ptp_enabled) and (not len(nwb_file.epochs)):
raise ValueError(

Check warning on line 701 in src/spikegadgets_to_nwb/convert_position.py

View check run for this annotation

Codecov / codecov/patch

src/spikegadgets_to_nwb/convert_position.py#L701

Added line #L701 was not covered by tests
"add_epochs() must be run before add_position() for non-ptp data"
)
Expand Down

0 comments on commit 44f0b87

Please sign in to comment.