From f31096b33e88a13de66af84c5d4671190d1a4bf0 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 3 Mar 2021 18:40:53 +0100 Subject: [PATCH] When procedure is reset delete only draft revision dossiers --- app/models/procedure.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/procedure.rb b/app/models/procedure.rb index c121e4590..73e865dfd 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -266,7 +266,7 @@ class Procedure < ApplicationRecord if locked? raise "Can not reset a locked procedure." else - groupe_instructeurs.each { |gi| gi.dossiers.destroy_all } + draft_revision.dossiers.destroy_all end end