unique-fix
This commit is contained in:
parent
7ee8003e2d
commit
45a827de64
|
@ -66,10 +66,12 @@ class ShoutsCache:
|
||||||
for s in shouts:
|
for s in shouts:
|
||||||
for a in s.authors:
|
for a in s.authors:
|
||||||
ShoutsCache.by_author[a.slug] = ShoutsCache.by_author.get(a.slug, [])
|
ShoutsCache.by_author[a.slug] = ShoutsCache.by_author.get(a.slug, [])
|
||||||
ShoutsCache.by_author[a.slug].append(s)
|
if a not in ShoutsCache.by_topic[a.slug]:
|
||||||
|
ShoutsCache.by_author[a.slug].append(s)
|
||||||
for t in s.topics:
|
for t in s.topics:
|
||||||
ShoutsCache.by_topic[t.slug] = ShoutsCache.by_topic.get(t.slug, [])
|
ShoutsCache.by_topic[t.slug] = ShoutsCache.by_topic.get(t.slug, [])
|
||||||
ShoutsCache.by_topic[t.slug].append(s)
|
if t not in ShoutsCache.by_topic[t.slug]:
|
||||||
|
ShoutsCache.by_topic[t.slug].append(s)
|
||||||
print("[zine.cache] indexed by %d topics " % len(ShoutsCache.by_topic.keys()))
|
print("[zine.cache] indexed by %d topics " % len(ShoutsCache.by_topic.keys()))
|
||||||
print("[zine.cache] indexed by %d authors " % len(ShoutsCache.by_author.keys()))
|
print("[zine.cache] indexed by %d authors " % len(ShoutsCache.by_author.keys()))
|
||||||
ShoutsCache.recent_published = shouts
|
ShoutsCache.recent_published = shouts
|
||||||
|
|
Loading…
Reference in New Issue
Block a user