forked from indymedia/epicyon
Deduplicate blocked posts list
parent
db98be75dd
commit
18e572e21f
2
posts.py
2
posts.py
|
@ -553,6 +553,7 @@ def getPostsForBlockedDomains(baseDir: str,
|
|||
if not blockedPosts.get(postDomain):
|
||||
blockedPosts[postDomain] = [url]
|
||||
else:
|
||||
if url not in blockedPosts[postDomain]:
|
||||
blockedPosts[postDomain].append(url)
|
||||
|
||||
if item['object'].get('tag'):
|
||||
|
@ -568,6 +569,7 @@ def getPostsForBlockedDomains(baseDir: str,
|
|||
if not blockedPosts.get(postDomain):
|
||||
blockedPosts[postDomain] = [url]
|
||||
else:
|
||||
if url not in blockedPosts[postDomain]:
|
||||
blockedPosts[postDomain].append(url)
|
||||
return blockedPosts
|
||||
|
||||
|
|
Loading…
Reference in New Issue