Corrections éditions des posts

This commit is contained in:
2023-07-06 05:52:10 +02:00
parent 54be4c878f
commit 450fe88faa
3 changed files with 20 additions and 17 deletions

View File

@@ -99,7 +99,7 @@ def edit(title, time):
else:
conn = sqlite3.connect(DATABASE) # Connexion à la base de donnée
cursor = conn.cursor() # Création de l'objet "curseur"
cursor.execute("""SELECT title, content FROM posts WHERE title=? AND time =?""", (title, time))
cursor.execute("""SELECT title, content, status FROM posts WHERE title=? AND time =?""", (title, time))
oldpost = cursor.fetchone()
conn.close()
return render_template('postedit.html',