This commit is contained in:
4
app.py
4
app.py
@@ -115,7 +115,7 @@ def post_a_post(post_key):
|
||||
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, children[*].answers_num ] } IN posts"""
|
||||
UPDATE ppp WITH { answers_list : [ children[*]._key, children[*].answers_num, children[*].children_num ] } IN posts"""
|
||||
)
|
||||
|
||||
postos = db.collection('posts')
|
||||
@@ -157,7 +157,7 @@ def post_to_post(post_key):
|
||||
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, children[*].answers_num ] } IN posts"""
|
||||
UPDATE ppp WITH { answers_list : [ children[*]._key, children[*].answers_num, children[*].children_num ] } IN posts"""
|
||||
)
|
||||
|
||||
postos = db.collection('posts')
|
||||
|
||||
Reference in New Issue
Block a user