Merge pull request #2781 from tchak/allow-users-to-fill-test-dossiers

Allow users to fill dossiers on démarches en brouillon
This commit is contained in:
Paul Chavard 2018-10-09 14:13:54 +00:00 committed by GitHub
commit acacfebd92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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."