fix(procedure): return most recent demarche for a given path

This commit is contained in:
Paul Chavard 2023-01-06 11:00:42 +01:00
parent 8958ba0725
commit e8b10fd320

View file

@ -75,7 +75,7 @@ module Users
end
def retrieve_procedure_with_closed
Procedure.publiees.or(Procedure.brouillons).or(Procedure.closes).find_by(path: params[:path])
Procedure.publiees.or(Procedure.brouillons).or(Procedure.closes).order(published_at: :desc).find_by(path: params[:path])
end
def retrieve_prefilled_dossier