From 06fe2c52562b1d8ce651362881e0d4ef5a59fb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Thu, 6 Mar 2025 14:11:21 +0100 Subject: [PATCH] fix --- .../medias/contexts/_context.html.erb | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/admin/communication/medias/contexts/_context.html.erb b/app/views/admin/communication/medias/contexts/_context.html.erb index d72df9b23..8e74ba3bd 100644 --- a/app/views/admin/communication/medias/contexts/_context.html.erb +++ b/app/views/admin/communication/medias/contexts/_context.html.erb @@ -9,17 +9,17 @@ partial = "admin/communication/medias/contexts/#{key}" <% rescue %> <% object = context.about -next if object.nil? -# If it's a localization, get real object -if object.respond_to?(:about) - object = object.about -end -begin - # TODO fix special pages - title = osuny_link_localized object, [:admin, object], classes: "stretched-link" -rescue - title = object.to_s_in(current_language) -end +if object.present? + # If it's a localization, get real object + if object.respond_to?(:about) + object = object.about + end + begin + # TODO fix special pages + title = osuny_link_localized object, [:admin, object], classes: "stretched-link" + rescue + title = object.to_s_in(current_language) + end %> <div> <div class="<%= osuny_card_classes(horizontal: true) %>"> -- GitLab