Compare commits

..

2 Commits

Author SHA1 Message Date
Simple_Not
0e727ef4fe Merge branch 'dev' into master-of-slaves
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-26 19:08:04 +10:00
Simple_Not
cf479d2353 order-bug fix
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-26 19:05:33 +10:00

6
app.py
View File

@ -60,7 +60,7 @@ def page_posts_from_db(target_post_id=None):
postos = db.collection('posts') postos = db.collection('posts')
postos = [ p for p in postos] postos = [ p for p in postos]
postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False) postos = sorted(postos, key=lambda posto: int(posto['_key']), reverse=False)
if not target_post_id: if not target_post_id:
target_post_id = postos[0]['_key'] target_post_id = postos[0]['_key']
@ -73,7 +73,7 @@ def answer_post(target_post_id):
postos = db.collection('posts') postos = db.collection('posts')
postos = [ p for p in postos] postos = [ p for p in postos]
postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False) postos = sorted(postos, key=lambda posto: int(posto['_key']), reverse=False)
if not target_post_id: if not target_post_id:
target_post_id = postos[0]['_key'] target_post_id = postos[0]['_key']
@ -145,7 +145,7 @@ def post_to_post(post_key):
) )
postos = db.collection('posts') postos = db.collection('posts')
postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False) postos = sorted(postos, key=lambda posto: int(posto['_key']), reverse=False)
return render_template("i-posts.html", host_id=docker_short_id, postos=postos) return render_template("i-posts.html", host_id=docker_short_id, postos=postos)