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