Retry on private blog entry logic
This commit is contained in:
parent
1d3dc51bca
commit
7edb2f21bc
|
@ -45,14 +45,13 @@ def get_index():
|
||||||
db = JsonDB.get("blog/index")
|
db = JsonDB.get("blog/index")
|
||||||
|
|
||||||
# Hide any private posts if we aren't logged in.
|
# Hide any private posts if we aren't logged in.
|
||||||
new_db = dict()
|
|
||||||
if not g.info["session"]["login"]:
|
if not g.info["session"]["login"]:
|
||||||
for post_id, data in db.items():
|
posts = list(db.keys())
|
||||||
if data["privacy"] == "private":
|
for post_id in posts:
|
||||||
continue
|
if db[post_id]["privacy"] == "private":
|
||||||
new_db[post_id] = db[post_id]
|
del db[post_id]
|
||||||
|
|
||||||
return new_db
|
return db
|
||||||
|
|
||||||
|
|
||||||
def rebuild_index():
|
def rebuild_index():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user