Skip to content

Commit 071f167

Browse files
committed
try swapping to hasattr
1 parent f158d33 commit 071f167

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nwbinspector/checks/icephys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
@register_check(importance=Importance.BEST_PRACTICE_VIOLATION, neurodata_type=IntracellularElectrode)
77
def check_intracellular_electrode_cell_id_exists(intracellular_electrode: IntracellularElectrode):
88
"""Check if the IntracellularElectrode contains a cell_id."""
9-
if getattr(intracellular_electrode, "cell_id", None) is None:
9+
if getattr(intracellular_electrode, "cell_id", "") is None: # Will only be None with PyNWB>=2.1.0
1010
return InspectorMessage(message="Please include a unique cell_id associated with this IntracellularElectrode.")

0 commit comments

Comments
 (0)