Merge pull request #3273 from betagouv/dev

MEP 2019-01-10-02
This commit is contained in:
Mathieu Magnin 2019-01-10 15:41:09 +01:00 committed by GitHub
commit f56eb6abe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,9 @@ class Champs::PieceJustificativeChamp < Champ
end
def for_api
Rails.application.routes.url_helpers.url_for(piece_justificative_file)
if piece_justificative_file.attached?
Rails.application.routes.url_helpers.url_for(piece_justificative_file)
end
end
private