diff --git a/cache/.gitkeep b/cache/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/templates/web/common/preview.html.twig b/templates/web/common/preview.html.twig index b607d6d017..0dba1f0cfd 100644 --- a/templates/web/common/preview.html.twig +++ b/templates/web/common/preview.html.twig @@ -15,7 +15,7 @@ {% set previewHtml5 = null %} -{% if app.getAclForUser(app.getAuthenticatedUser()).has_access_to_subdef(record, 'preview') %} +{% if app.getAclForUser(app.getAuthenticatedUser()).has_access_to_subdef(record, 'preview') and record.has_preview == true %} {% set preview_obj = record.get_preview() %} {% else %} {% set preview_obj = record.get_thumbnail() %}