fix-topic
This commit is contained in:
parent
56a1467d3c
commit
abfbb68ac3
|
@ -117,8 +117,8 @@ input TopicInput {
|
||||||
title: String
|
title: String
|
||||||
body: String
|
body: String
|
||||||
pic: String
|
pic: String
|
||||||
children: [String]
|
# children: [String]
|
||||||
parents: [String]
|
# parents: [String]
|
||||||
}
|
}
|
||||||
|
|
||||||
input ReactionInput {
|
input ReactionInput {
|
||||||
|
|
|
@ -17,15 +17,15 @@ class TopicStorage:
|
||||||
|
|
||||||
print("[zine.topics] %d precached" % len(self.topics.keys()))
|
print("[zine.topics] %d precached" % len(self.topics.keys()))
|
||||||
|
|
||||||
@staticmethod
|
# @staticmethod
|
||||||
def load_parents(topic):
|
# def load_parents(topic):
|
||||||
self = TopicStorage
|
# self = TopicStorage
|
||||||
parents = []
|
# parents = []
|
||||||
for parent in self.topics.values():
|
# for parent in self.topics.values():
|
||||||
if topic.slug in parent.children:
|
# if topic.slug in parent.children:
|
||||||
parents.append(parent.slug)
|
# parents.append(parent.slug)
|
||||||
topic.parents = parents
|
# topic.parents = parents
|
||||||
return topic
|
# return topic
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def get_topics_all():
|
async def get_topics_all():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user