From 4a59d76cdc5235bc04af797a9080d5a8f4a6f55c Mon Sep 17 00:00:00 2001 From: Ben Busby <33362396+benbusby@users.noreply.github.com> Date: Mon, 11 May 2020 19:05:40 -0600 Subject: [PATCH] Updated filter to not rely on valid config to work properly --- app/filter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/filter.py b/app/filter.py index 8621408..a77116c 100644 --- a/app/filter.py +++ b/app/filter.py @@ -19,9 +19,9 @@ class Filter: if config is None: config = {} - self.near = config.near - self.dark = config.dark - self.nojs = config.nojs + self.near = config['near'] if 'near' in config else '' + self.dark = config['dark'] if 'dark' in config else False + self.nojs = config['nojs'] if 'nojs' in config else False self.mobile = mobile self.secret_key = secret_key