Skip to content

Commit 9e25aa1

Browse files
committed
fix search bug when json file doesn't exist for video
1 parent 685fa71 commit 9e25aa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jabs/ui/behavior_search_dialog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def run(self):
3636
video_manager = self.project.video_manager
3737
for video in video_manager.videos:
3838
anno_dict = video_manager.load_annotations(video)
39-
if "annotations" in anno_dict:
40-
for annotation in anno_dict["annotations"]:
39+
if anno_dict is not None:
40+
for annotation in anno_dict.get("annotations", []):
4141
if "tag" in annotation:
4242
all_tags.add(annotation["tag"])
4343

0 commit comments

Comments
 (0)