From 70a87132aa26d706cdf8f5d1e1b7fa8052d90e4b Mon Sep 17 00:00:00 2001 From: vincent porte Date: Wed, 18 Dec 2024 14:30:02 +0100 Subject: [PATCH] update comment --- lacommunaute/forum_conversation/admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lacommunaute/forum_conversation/admin.py b/lacommunaute/forum_conversation/admin.py index 46730026..2d12efdd 100644 --- a/lacommunaute/forum_conversation/admin.py +++ b/lacommunaute/forum_conversation/admin.py @@ -6,9 +6,9 @@ class PostAdmin(BasePostAdmin): def get_actions(self, request): - # delete_selected action does not call delete method of the model - # related topic is not update (last_post, posts_count) making - # the website inconsistent + # delete_selected action does not call delete method of the model, so Related topic is not updated. + # When the last post of a topic is deleted, topic.posts_count remains to 1, saying ambiguous information. + # So we remove the delete_selected action to force the user to delete posts one by one. return [] list_filter = BasePostAdmin.list_filter + ("approved",)