Fix sentry errors in old carto module

This commit is contained in:
Paul Chavard 2018-10-22 15:37:47 +02:00
parent f75d890a1f
commit e5d8d351ba
2 changed files with 8 additions and 4 deletions

View file

@ -91,7 +91,7 @@ module ApplicationHelper
end
def ensure_safe_json(json)
JSON.parse(json).to_json
json.present? ? JSON.parse(json).to_json : '[]'
rescue Exception => e
Raven.capture_exception(e)
{}