From 23c9c7dc0d3ecfc8489134b4adbae3a2b2d83ea4 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 23 Oct 2024 14:19:12 -0300 Subject: [PATCH] =?UTF-8?q?fixup!=20fix:=20mostrar=20la=20relaci=C3=B3n=20?= =?UTF-8?q?deshabilitada=20#17616?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/concerns/metadata/unused_values_concern.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/concerns/metadata/unused_values_concern.rb b/app/models/concerns/metadata/unused_values_concern.rb index 79cdbe65..a6f8aa54 100644 --- a/app/models/concerns/metadata/unused_values_concern.rb +++ b/app/models/concerns/metadata/unused_values_concern.rb @@ -19,8 +19,10 @@ module Metadata disabled = false + # El campo está deshabilitado si está completo y no incluye el + # post actual. if inverse? - disabled = p[inverse].empty? || ![p[inverse].value].flatten.include?(post.uuid.value) + disabled = p[inverse].present? && ![p[inverse].value].flatten.include?(post.uuid.value) end [title(p), p.uuid.value, disabled]