This commit is contained in:
parent
a46cc7c78c
commit
67fac37e44
10
app.py
10
app.py
@ -114,7 +114,10 @@ def post_a_post(post_key):
|
|||||||
|
|
||||||
cursor = db.aql.execute(
|
cursor = db.aql.execute(
|
||||||
"""FOR ppp IN posts
|
"""FOR ppp IN posts
|
||||||
LET children = (FOR v IN 1OUTBOUND ppp post_parents RETURN v)
|
LET children0 = (FOR v IN 1 OUTBOUND ppp post_parents RETURN v)
|
||||||
|
LET children = (FOR c IN children0
|
||||||
|
SORT c._key DESC
|
||||||
|
RETURN c)
|
||||||
UPDATE ppp WITH { answers_list : [ children[*]._key, children[*].answers_num, children[*].children_num ] } IN posts"""
|
UPDATE ppp WITH { answers_list : [ children[*]._key, children[*].answers_num, children[*].children_num ] } IN posts"""
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -156,7 +159,10 @@ def post_to_post(post_key):
|
|||||||
)
|
)
|
||||||
cursor = db.aql.execute(
|
cursor = db.aql.execute(
|
||||||
"""FOR ppp IN posts
|
"""FOR ppp IN posts
|
||||||
LET children = (FOR v IN 1OUTBOUND ppp post_parents RETURN v)
|
LET children0 = (FOR v IN 1 OUTBOUND ppp post_parents RETURN v)
|
||||||
|
LET children = (FOR c IN children0
|
||||||
|
SORT c._key DESC
|
||||||
|
RETURN c)
|
||||||
UPDATE ppp WITH { answers_list : [ children[*]._key, children[*].answers_num, children[*].children_num ] } IN posts"""
|
UPDATE ppp WITH { answers_list : [ children[*]._key, children[*].answers_num, children[*].children_num ] } IN posts"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user