diff --git a/changedetectionio/model/Watch.py b/changedetectionio/model/Watch.py index 3689cf93..a8030abe 100644 --- a/changedetectionio/model/Watch.py +++ b/changedetectionio/model/Watch.py @@ -248,7 +248,8 @@ class model(dict): if os.path.isfile(fname): return fname - return False + # False is not an option for AppRise, must be type None + return None def __get_file_ctime(self, filename): fname = os.path.join(self.watch_data_dir, filename) diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index 116c0cce..ec5e9d19 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -103,7 +103,7 @@ def process_notification(n_object, datastore): body=n_body, body_format=n_format, # False is not an option for AppRise, must be type None - attach=None if not n_object.get('screenshot') else n_object.get('screenshot') + attach=n_object.get('screenshot', None) ) apobj.clear() diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index 154187b1..133331ea 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -74,7 +74,7 @@ class update_worker(threading.Thread): n_object.update({ 'watch_url': watch['url'], 'uuid': watch_uuid, - 'screenshot': watch.get_screenshot() if watch.get('notification_screenshot') else False, + 'screenshot': watch.get_screenshot(), 'current_snapshot': snapshot_contents.decode('utf-8'), 'diff': diff.render_diff(watch_history[dates[-2]], watch_history[dates[-1]], line_feed_sep=line_feed_sep), 'diff_full': diff.render_diff(watch_history[dates[-2]], watch_history[dates[-1]], True, line_feed_sep=line_feed_sep) @@ -108,7 +108,7 @@ class update_worker(threading.Thread): n_object.update({ 'watch_url': watch['url'], 'uuid': watch_uuid, - 'screenshot': False + 'screenshot': None }) self.notification_q.put(n_object) print("Sent filter not found notification for {}".format(watch_uuid))