From 9fb3601d9274c67202797a6dfefe35cc11a1a413 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 17 Apr 2024 18:04:19 -0300 Subject: [PATCH] fix: cambiar el valor una sola vez --- app/models/metadata_template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/metadata_template.rb b/app/models/metadata_template.rb index 89fd8315..03d42339 100644 --- a/app/models/metadata_template.rb +++ b/app/models/metadata_template.rb @@ -161,7 +161,7 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type, # once => el campo solo se puede modificar si estaba vacĂ­o def writable? case layout.metadata.dig(name, 'writable') - when 'once' then value.blank? + when 'once' then value_was.blank? else true end end