From 3322f4a70b04e29ae1dcfd582af305d0a4f4a32a Mon Sep 17 00:00:00 2001 From: Leigh Morresi <275001+dgtlmoon@users.noreply.github.com> Date: Thu, 28 Jan 2021 11:12:26 +0100 Subject: [PATCH] Avoid recasting the type --- backend/store.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/store.py b/backend/store.py index 54879472..070116c8 100644 --- a/backend/store.py +++ b/backend/store.py @@ -85,10 +85,7 @@ class ChangeDetectionStore: # Probably their should be dict... for watch in self.data['watching']: if watch['uuid'] == uuid: - if val in watch: - return watch[val] - else: - return None + return watch.get(val) return None