File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
element_array_ephys/export/nwb Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -113,17 +113,17 @@ def add_electrodes_to_nwb(session_key: dict, nwbfile: pynwb.NWBFile):
113
113
for this_probe in (ephys .ProbeInsertion * probe .Probe & session_key ).fetch (
114
114
as_dict = True
115
115
):
116
- insertion_record = (ephys .InsertionLocation & this_probe ).fetch ()
117
- if len (insertion_record )== 1 :
116
+ insertion_record = (ephys .InsertionLocation & this_probe ).fetch (as_dict = True )
117
+ if len (insertion_record ) == 1 :
118
118
insert_location = json .dumps (
119
119
{
120
120
k : v
121
- for k , v in insertion_record .items ()
121
+ for k , v in insertion_record [ 0 ] .items ()
122
122
if k not in ephys .InsertionLocation .primary_key
123
123
},
124
124
cls = DecimalEncoder ,
125
125
)
126
- elif len (insertion_record )== 0 :
126
+ elif len (insertion_record ) == 0 :
127
127
insert_location = "unknown"
128
128
else :
129
129
raise DataJointError (f'Found multiple insertion locations for { this_probe } ' )
You can’t perform that action at this time.
0 commit comments