mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
Fix incorrect parsing of None
This commit is contained in:
parent
fb07319831
commit
c443a36c7f
@ -163,22 +163,27 @@ class EventProcessor(threading.Thread):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
attributes = [
|
try:
|
||||||
(
|
attributes = [
|
||||||
None
|
(
|
||||||
if event_data["snapshot"] is None
|
None
|
||||||
else {
|
if event_data["snapshot"] is None
|
||||||
"box": to_relative_box(
|
else {
|
||||||
width,
|
"box": to_relative_box(
|
||||||
height,
|
width,
|
||||||
a["box"],
|
height,
|
||||||
),
|
a["box"],
|
||||||
"label": a["label"],
|
),
|
||||||
"score": a["score"],
|
"label": a["label"],
|
||||||
}
|
"score": a["score"],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
for a in event_data["snapshot"]["attributes"]
|
||||||
|
]
|
||||||
|
except TypeError:
|
||||||
|
logger.warning(
|
||||||
|
f"Failed to parse attributes of event data, event data is {event_data}"
|
||||||
)
|
)
|
||||||
for a in event_data["snapshot"]["attributes"]
|
|
||||||
]
|
|
||||||
|
|
||||||
# keep these from being set back to false because the event
|
# keep these from being set back to false because the event
|
||||||
# may have started while recordings and snapshots were enabled
|
# may have started while recordings and snapshots were enabled
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user