mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Throw error when score is outside expected bounds
This commit is contained in:
parent
28985007e3
commit
f47aa85b0d
@ -386,6 +386,18 @@ def set_sub_label(id):
|
||||
400,
|
||||
)
|
||||
|
||||
if new_score > 1.0 or new_score < 0:
|
||||
return make_response(
|
||||
jsonify(
|
||||
{
|
||||
"success": False,
|
||||
"message": new_score
|
||||
+ " does not fit within the expected bounds 0 < score < 1.0",
|
||||
}
|
||||
),
|
||||
400,
|
||||
)
|
||||
|
||||
if not event.end_time:
|
||||
tracked_obj: TrackedObject = (
|
||||
current_app.detected_frames_processor.camera_states[
|
||||
|
||||
Loading…
Reference in New Issue
Block a user