Skip to content

Commit

Permalink
use getattr instead of get (#8094)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 committed Oct 8, 2023
1 parent e1a6398 commit dbd21eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frigate/ptz/onvif.py
Expand Up @@ -176,7 +176,7 @@ def _init_onvif(self, camera_name: str) -> bool:

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
Expand Down

0 comments on commit dbd21eb

Please sign in to comment.