Skip to content

Commit

Permalink
add warning (#1098)
Browse files Browse the repository at this point in the history
* add warning

* Update src/pynwb/misc.py

Co-Authored-By: Ben Dichter <[email protected]>
  • Loading branch information
ajtritt and bendichter authored Oct 24, 2019
1 parent 96bc559 commit 49b5ee6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pynwb/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def add_unit(self, **kwargs):
if self.__electrode_table is None:
nwbfile = self.get_ancestor(data_type='NWBFile')
elec_col.table = nwbfile.electrodes
if elec_col.table is None:
warnings.warn('Reference to electrode table that does not yet exist')
else:
elec_col.table = self.__electrode_table

Expand Down

0 comments on commit 49b5ee6

Please sign in to comment.