mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-18 06:08:22 +03:00
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
This commit is contained in:
parent
5a214eb0d1
commit
413779ee2a
@ -727,7 +727,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif (
|
elif (
|
||||||
topic == DetectionTypeEnum.api.value or DetectionTypeEnum.lpr.value
|
topic == DetectionTypeEnum.api.value or topic == DetectionTypeEnum.lpr.value
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user