From ce5f33e60421142379d58e054b32bcd2b71b6b5a Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Wed, 19 Jul 2023 01:07:42 +1000 Subject: [PATCH] we can chat now? --- app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.py b/app.py index e9534bc..210d7b4 100644 --- a/app.py +++ b/app.py @@ -154,6 +154,11 @@ def post_to_post(post_key): LET children = (FOR v IN 1OUTBOUND ppp post_parents RETURN v) UPDATE ppp WITH { answers_num : COUNT_DISTINCT( children[*]._key ) } IN posts""" ) + cursor = db.aql.execute( + """FOR ppp IN posts + LET children = (FOR v IN 1OUTBOUND ppp post_parents RETURN v) + UPDATE ppp WITH { answers_list : children[*]._key } IN posts""" + ) postos = db.collection('posts') postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False)