Allow users to fill dossiers on démarches en brouillon

This commit is contained in:
Paul Chavard 2018-10-09 15:05:08 +02:00
parent 3edff83e85
commit cc96723475

View file

@ -16,7 +16,7 @@ class Users::DossiersController < UsersController
procedure_path = ProcedurePath.find_by(path: params[:procedure_path])
procedure = procedure_path&.procedure
if procedure&.brouillon_avec_lien?
if procedure&.brouillon? && procedure&.path.present?
redirect_to new_users_dossier_path(procedure_id: procedure.id, brouillon: true)
else
flash.alert = "La démarche est inconnue."