Skip to content

Commit dab5dfe

Browse files
committed
add skip_duplicates=True in probe.Probe.insert
1 parent 5d50894 commit dab5dfe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

element_array_ephys/ephys_acute.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def auto_generate_entries(cls, session_key):
182182
}
183183
if (
184184
probe_key["probe"] not in [p["probe"] for p in probe_list]
185-
and probe_key not in probe.Probe()
186185
):
187186
probe_list.append(probe_key)
188187

@@ -209,7 +208,6 @@ def auto_generate_entries(cls, session_key):
209208
}
210209
if (
211210
probe_key["probe"] not in [p["probe"] for p in probe_list]
212-
and probe_key not in probe.Probe()
213211
):
214212
probe_list.append(probe_key)
215213
probe_insertion_list.append(
@@ -222,7 +220,7 @@ def auto_generate_entries(cls, session_key):
222220
else:
223221
raise NotImplementedError(f"Unknown acquisition software: {acq_software}")
224222

225-
probe.Probe.insert(probe_list)
223+
probe.Probe.insert(probe_list, skip_duplicates=True)
226224
cls.insert(probe_insertion_list, skip_duplicates=True)
227225

228226

0 commit comments

Comments
 (0)