fix logic error in preset fetch (#8245)

This commit is contained in:
Josh Hawkins 2023-10-20 18:27:47 -05:00 committed by GitHub
parent 0c2f3a9702
commit ee1e1b748c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,7 @@ class OnvifController:
for preset in presets:
self.cams[camera_name]["presets"][
getattr(preset, "Name", f"preset {preset['token']}").lower()
(getattr(preset, "Name") or f"preset {preset['token']}").lower()
] = preset["token"]
# get list of supported features