frigate/frigate
ryzendigo f658dbb158
fix: operator precedence makes detection type check always true (#22471)
* fix: operator precedence bug in detection type check

The condition:
  topic == DetectionTypeEnum.api.value or DetectionTypeEnum.lpr.value

evaluates as:
  (topic == DetectionTypeEnum.api.value) or (DetectionTypeEnum.lpr.value)

Since DetectionTypeEnum.lpr.value is a non-empty string (truthy), the
second operand is always True regardless of topic. The intended check
is whether topic matches either enum value:
  topic == DetectionTypeEnum.api.value or topic == DetectionTypeEnum.lpr.value

* fix: apply same or operator fix to review/maintainer.py

Same issue as record/maintainer.py — the condition was always true
because the bare enum value is truthy.

* style: ruff format record/maintainer.py
2026-03-18 09:40:54 -05:00
..
api fix: run Frigate+ API calls in thread pool to prevent event loop bloc… (#22426) 2026-03-14 14:31:33 -06:00
camera Various Fixes (#22263) 2026-03-04 15:53:20 -07:00
comms Debug replay (#22212) 2026-03-04 10:07:34 -06:00
config Support using GenAI for embeddings / semantic search (#22323) 2026-03-08 10:55:00 -05:00
data_processing Handle percentage as int (#22370) 2026-03-10 07:35:00 -06:00
db Improve LPR regex support (#19767) 2025-08-26 08:11:37 -05:00
detectors Initial commit for AXERA AI accelerators (#22206) 2026-03-11 06:49:28 -06:00
embeddings fix: update correct metric in batch_embed_thumbnail (#22501) 2026-03-16 17:33:40 -06:00
events fix: iterator exhausted by debug log prevents event cleanup (#22469) 2026-03-16 06:48:35 -06:00
genai Review fixes (#22442) 2026-03-15 07:26:36 -05:00
images Replace green screen with error message and force camera_fps to 0 (#4544) 2022-11-28 21:47:20 -06:00
jobs Improve motion review and add motion search (#22253) 2026-03-05 17:53:48 -06:00
motion Skip motion threshold configuration (#22255) 2026-03-05 18:20:03 -06:00
object_detection [MemryX] Clean shutdown of detector process (#21035) 2025-11-25 10:25:07 -07:00
output fix: handle custom logo images without alpha channel (#22468) 2026-03-16 06:46:31 -06:00
ptz fix: inverted condition causes division by zero in velocity direction check (#22470) 2026-03-16 06:47:24 -06:00
record fix: operator precedence makes detection type check always true (#22471) 2026-03-18 09:40:54 -05:00
review fix: operator precedence makes detection type check always true (#22471) 2026-03-18 09:40:54 -05:00
service_manager Add metrics page for embeddings and face / license plate processing times (#15818) 2025-02-08 12:47:01 -06:00
stats Debug replay (#22212) 2026-03-04 10:07:34 -06:00
test Add dynamic configuration for more fields (#22295) 2026-03-06 13:45:39 -07:00
track Debug replay (#22212) 2026-03-04 10:07:34 -06:00
util fix: return ValueError should be raise ValueError (#22474) 2026-03-16 06:43:56 -06:00
__init__.py app container and config schema 2021-01-26 21:40:33 -06:00
__main__.py Handle SIGINT with forkserver (#18860) 2025-08-16 10:20:33 -05:00
app.py Improve motion review and add motion search (#22253) 2026-03-05 17:53:48 -06:00
const.py Debug replay (#22212) 2026-03-04 10:07:34 -06:00
debug_replay.py Add ability to delete cameras (#22336) 2026-03-08 16:23:48 -06:00
ffmpeg_presets.py fix: wrong index for FPS replacement in preset-http-jpeg-generic (#22465) 2026-03-16 09:57:14 -06:00
log.py Add languages (#21870) 2026-02-03 13:29:52 -06:00
models.py Improve motion review and add motion search (#22253) 2026-03-05 17:53:48 -06:00
mypy.ini Enable mypy for track and fix typing errors (#19529) 2025-08-17 12:27:42 -05:00
plus.py fix: upload_image parses response body before checking HTTP status (#22475) 2026-03-16 17:34:30 -06:00
storage.py Debug replay (#22212) 2026-03-04 10:07:34 -06:00
timeline.py Debug replay (#22212) 2026-03-04 10:07:34 -06:00
types.py Media sync API refactor and UI (#21542) 2026-02-26 21:27:56 -07:00
video.py Add dynamic configuration for more fields (#22295) 2026-03-06 13:45:39 -07:00
watchdog.py Improve async object detector support (#17712) 2025-04-15 08:55:38 -05:00