Skip to content

Commit 860cbf7

Browse files
authored
Dev (#48)
* 3.0.2 (#44) * Do not include file name in creating db path * Add db tests * Use consts for env vars * Formatting * Only check if the path exists * Improve test * Format tests * 3.0.3 (#47) * 3.0.2 (#44) (#45) * Do not include file name in creating db path * Add db tests * Use consts for env vars * Formatting * Only check if the path exists * Improve test * Format tests * Don't assume variant is included * Bump version * Formatting
1 parent d3740c5 commit 860cbf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swatch/detection.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def __handle_detections__(self, detection_result: Dict[str, Any]) -> None:
8383

8484
self.obj_data[non_unique_id]["object_name"] = object_name
8585
self.obj_data[non_unique_id]["zone_name"] = zone_name
86-
self.obj_data[non_unique_id]["variant"] = object_result["variant"]
86+
self.obj_data[non_unique_id]["variant"] = object_result.get(
87+
"variant", "default"
88+
)
8789

8890
if object_result.get("objects"):
8991
top_area = max([d["area"] for d in object_result["objects"]])

0 commit comments

Comments
 (0)