From a2a1d5ae902b056228cd594e884b6775e4e8f150 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 29 May 2022 22:04:23 +0200 Subject: [PATCH] Distill.io import bug fix when no tags assigned to a watch (#557) --- changedetectionio/importer.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/changedetectionio/importer.py b/changedetectionio/importer.py index 30d349e6..4d3e2b2b 100644 --- a/changedetectionio/importer.py +++ b/changedetectionio/importer.py @@ -92,7 +92,7 @@ class import_distill_io_json(Importer): for d in data.get('data'): d_config = json.loads(d['config']) - extras = {'title': d['name']} + extras = {'title': d.get('name', None)} if len(d['uri']) and good < 5000: try: @@ -114,12 +114,9 @@ class import_distill_io_json(Importer): except IndexError: pass - try: + + if d.get('tags', False): extras['tag'] = ", ".join(d['tags']) - except KeyError: - pass - except IndexError: - pass new_uuid = datastore.add_watch(url=d['uri'].strip(), extras=extras,