From dbd21eb6fabd3c6f9411d5a22be45e3d63a8f117 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:30:23 -0500 Subject: [PATCH] use getattr instead of get (#8094) --- frigate/ptz/onvif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/ptz/onvif.py b/frigate/ptz/onvif.py index 7ab13b9e9..0315446e9 100644 --- a/frigate/ptz/onvif.py +++ b/frigate/ptz/onvif.py @@ -176,7 +176,7 @@ class OnvifController: for preset in presets: self.cams[camera_name]["presets"][ - preset.get("Name", f"preset {preset['token']}").lower() + getattr(preset, "Name", f"preset {preset['token']}").lower() ] = preset["token"] # get list of supported features