From cc5884a274f44f9ebb6365f141e03bedb161aff9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Oct 2020 14:21:29 +0000 Subject: [PATCH] Avoid multiple stores --- newsdaemon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/newsdaemon.py b/newsdaemon.py index 2147fc73b..0ee41c214 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -638,9 +638,12 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, else: content += hashtagHtml blog['object']['content'] = content - storeHashTags(baseDir, 'news', blog) - newswire[originalDateStr][6] = hashtags + # update the newswire tags if new ones have been found by + # newswireHashtagProcessing + for tag in hashtags: + if tag not in newswire[originalDateStr][6]: + newswire[originalDateStr][6].append(tag) storeHashTags(baseDir, 'news', blog)