From f8955e3169f1b0b6e18232e0b6f9996271eb62ea Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Thu, 18 Apr 2024 17:04:56 +0100 Subject: [PATCH] Fix csv preview url --- app/presenters/publication_presenter.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/presenters/publication_presenter.rb b/app/presenters/publication_presenter.rb index 2bbb092af..7163c134d 100644 --- a/app/presenters/publication_presenter.rb +++ b/app/presenters/publication_presenter.rb @@ -21,6 +21,7 @@ def documents docs.each do |doc| doc["type"] = "html" unless doc["content_type"] doc["type"] = "external" if doc["attachment_type"] == "external" + doc["preview_url"] = "#{doc['url']}/preview" doc["alternative_format_contact_email"] = nil if doc["accessible"] == true end end