Fix Sentry 161

This commit is contained in:
Mathieu Magnin 2019-01-10 15:18:54 +01:00
parent c8560d4c3d
commit 31c45fe2e5

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