This commit is contained in:
parent
57e598814f
commit
ce5f33e604
5
app.py
5
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)
|
||||
|
Loading…
Reference in New Issue
Block a user