Skip to content

Commit a26861e

Browse files
authored
Fix crash when no object result is returned (due to bad image or otherwise) (#49)
1 parent 860cbf7 commit a26861e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
default_target: local
22

33
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
4-
VERSION = 3.0.2
4+
VERSION = 3.0.4
55

66
local:
77
cd web; flutter build web;

swatch/detection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def __handle_detections__(self, detection_result: Dict[str, Any]) -> None:
108108
self.obj_data[non_unique_id]["id"] = unique_id
109109
self.__handle_db__("new", non_unique_id)
110110
else:
111-
if object_result["result"]:
111+
if object_result.get("result", False):
112112
self.__handle_db__("update", non_unique_id)
113113
else:
114114
self.__handle_db__("end", non_unique_id)

0 commit comments

Comments
 (0)