-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🦇 désactiver la suppression en masse des
Post
depuis l'admin d…
…jango (#861) ## Description 🎸 Il est apparu un cas de `Topic` où `posts_count` était supérieur à zéro après la suppression du `Post` associé via l'admin. 🎸 Ce `Topic` a fait échouer en erreur 500, l'affichage des listes de `Topic`, lors de la tentative d'affichage des données de détail du `first_post` 🪭 Issue #860, https://inclusion.sentry.io/issues/14670791/?project=4508410606452816 🪭 Cas reproduit en supprimant des `Post` depuis la liste dans l'admin 🪭 Cause identifiée : la méthode `delete_selected` n'appelle pas la méthode `delete` de `machina` sur ces objets. Les données dénormalisées des `Topic` associés ne sont pas mises à jour. 🧦 Patch : desactivation de la méthode `delete_selected` dans l'admin ## Type de changement 🪲 Correction de bug (changement non cassant qui corrige un problème). 🚧 technique ### Points d'attention 🦺 factorisation des paramètres commun des queryset `unanswered` et `optimized_for_topics_list` 🦺 mise à jour des tests impactés et ajout du trait `with_disapproved_post`, réécriture simplifiée en pytest 🦺 des cas similaires peuvent se produire sur les `Topic` vs les données dénormalisées des `Forum`. Celles-ci ne sont pas exploitées dans l'UI, pas d'incidence pour le moment.
- Loading branch information
1 parent
66ca0f5
commit e094434
Showing
5 changed files
with
65 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters