From eb8b85eb09c67558deafef4892d9d1674ecfac04 Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 19 Jun 2022 02:10:37 -0400 Subject: [PATCH] Exclude drafts from edit limit. --- files/routes/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 89f144968..528d07a18 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -441,7 +441,7 @@ def edit_post(pid, v): p = get_post(pid) if not v.admin_level >= 3: - if time.time() - p.created_utc > 7*24*60*60: + if time.time() - p.created_utc > 7*24*60*60 and not p.private: return {"error":"You can't edit posts older than 1 week!"}, 403 elif p.author_id != v.id: abort(403)