Skip to content

Commit 811b05b

Browse files
committed
change label check for v2 curation
1 parent 0ebdd27 commit 811b05b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

spikeinterface_gui/controller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,11 +1117,13 @@ def set_label_to_unit(self, unit_id, category, label):
11171117
if label is None:
11181118
self.remove_category_from_unit(unit_id, category)
11191119
return
1120+
1121+
label_types = self.curation_data['label_definitions'].keys()
11201122

11211123
ix = self.find_unit_in_manual_labels(unit_id)
11221124
if ix is not None:
11231125
lbl = self.curation_data["manual_labels"][ix]
1124-
if "labels" in lbl and category in lbl["labels"]:
1126+
if "labels" in lbl and category in label_types:
11251127
# v2 format
11261128
lbl["labels"][category] = [label]
11271129
elif category in lbl:

0 commit comments

Comments
 (0)