File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -160,14 +160,14 @@ public static function cleanup(string $startDate, bool $dryRun)
160160 $ documentCount ++;
161161 }
162162
163- // Supprimer les liens dans control_measure
164- DB ::table ('control_measure ' )->where ('control_id ' , $ control ->id )->delete ();
165-
166- // Supprimer les plans d'action
167- DB ::table ('actions ' )->where ('control_id ' , $ control ->id )->delete ();
168-
169163 // Supprimer le contrôle lui-même
170164 if (! $ dryRun ) {
165+ // Supprimer les liens dans control_measure
166+ DB ::table ('control_measure ' )->where ('control_id ' , $ control ->id )->delete ();
167+
168+ // Supprimer les plans d'action
169+ DB ::table ('actions ' )->where ('control_id ' , $ control ->id )->delete ();
170+
171171 // Remove next_id link
172172 Control::where ('next_id ' , $ control ->id )->update (['next_id ' => null ]);
173173 // delete control
You can’t perform that action at this time.
0 commit comments