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)