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:07:42 +10:00
parent 57e598814f
commit ce5f33e604

5
app.py
View File

@ -154,6 +154,11 @@ def post_to_post(post_key):
LET children = (FOR v IN 1OUTBOUND ppp post_parents RETURN v) LET children = (FOR v IN 1OUTBOUND ppp post_parents RETURN v)
UPDATE ppp WITH { answers_num : COUNT_DISTINCT( children[*]._key ) } IN posts""" 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 = db.collection('posts')
postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False) postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False)