From 7be36d900cd73504a05535bf416e06820c4ccd38 Mon Sep 17 00:00:00 2001 From: Neha Tirumalai Date: Fri, 22 Sep 2023 12:31:20 -0400 Subject: [PATCH] added commit for db in delete_comment to fix error --- albumy/blueprints/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/albumy/blueprints/main.py b/albumy/blueprints/main.py index e526d50..e0e6034 100644 --- a/albumy/blueprints/main.py +++ b/albumy/blueprints/main.py @@ -362,6 +362,8 @@ def delete_comment(comment_id): and not current_user.can('MODERATE'): abort(403) db.session.delete(comment) + db.session.commit() + flash('Comment deleted.', 'info') return redirect(url_for('.show_photo', photo_id=comment.photo_id))