we can chat now?
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not
2023-07-19 01:01:55 +10:00
parent c30e2c8705
commit 089b022a3b
2 changed files with 13 additions and 0 deletions

6
app.py
View File

@@ -112,6 +112,12 @@ def post_a_post(post_key):
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)