#337 [RegistrationCertificateFr] fix: delete carte grise definitively (hard delete) - #435
Open
evarisk-kilyan wants to merge 1 commit into
Conversation
…itively (hard delete) The list mass-action (and any delete action) called SaturneObject::delete() with its default soft-delete behavior, leaving the row in database with a status of -1 (Deleted) instead of removing it. Override delete() so a registration certificate is removed definitively (hard delete) by default, while keeping the $softDelete parameter for callers that still need it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Closes #337
La suppression d'une carte grise (
RegistrationCertificateFr) passait par le comportement par défaut deSaturneObject::delete(), dont le 3ᵉ paramètre$softDeletevauttrue. La ligne n'était donc pas réellement supprimée : elle restait en base avec le statut-1(Deleted). C'est le cas notamment de la mass-action « Supprimer » de la liste, qui appelle$object->delete($user).Correctif
Override de
delete()dansclass/registrationcertificatefr.class.phppour basculer la valeur par défaut de$softDeleteàfalseet déléguer àparent::delete()→ suppression définitive (hard delete) viadeleteCommon().$softDeletereste disponible pour les appelants qui souhaiteraient explicitement un soft delete.STATUS_DELETEDet son libellé sont conservés pour l'affichage d'éventuelles lignes déjà soft-deletées en base.Test
llx_dolicar_registrationcertificatefr(plus de ligne en statut-1).