Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Dec 18, 2024
1 parent 4b1e38a commit 70a8713
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lacommunaute/forum_conversation/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",)
Expand Down

0 comments on commit 70a8713

Please sign in to comment.