fix(commencer/test): with procedure without service nor organisation, no more crashes
Update app/controllers/users/commencer_controller.rb Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
This commit is contained in:
parent
2529773515
commit
552208a03c
2 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ module Users
|
|||
def generate_empty_pdf(revision)
|
||||
@dossier = revision.new_dossier
|
||||
data = render_to_string(template: 'dossiers/dossier_vide', formats: [:pdf])
|
||||
send_data(data, :filename => "#{revision.procedure.libelle}.pdf")
|
||||
send_data(data, filename: "#{revision.procedure.libelle}.pdf")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -185,7 +185,7 @@ prawn_document(page_size: "A4") do |pdf|
|
|||
pdf.move_down(40)
|
||||
|
||||
render_in_2_columns(pdf, 'Démarche', @dossier.procedure.libelle)
|
||||
render_in_2_columns(pdf, 'Organisme', @dossier.procedure.organisation_name)
|
||||
render_in_2_columns(pdf, 'Organisme', @dossier.procedure.organisation_name || "En attente de saisi")
|
||||
pdf.text "\n"
|
||||
|
||||
add_title(pdf, "Identité du demandeur")
|
||||
|
|
Loading…
Reference in a new issue