fix hn self posts related discussion.

This commit is contained in:
Jason Schwarzenberger 2020-11-20 13:06:19 +13:00
parent abf7f0a802
commit a86eb98c1a

View File

@ -99,6 +99,8 @@ def submit():
def story(sid):
story = database.get_story(sid)
if story:
related = []
if story.meta['url']:
related = database.get_stories_by_url(story.meta['url'])
related = [r.meta for r in related]
res = Response(json.dumps({"story": story.data, "related": related}))