Merge pull request #3272 from betagouv/fix-sentry-161

Fix Sentry 161
This commit is contained in:
Mathieu Magnin 2019-01-10 15:27:30 +01:00 committed by GitHub
commit b555b858da
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