diff --git a/app/models/metadata_has_many.rb b/app/models/metadata_has_many.rb index b4db4454..a15f1241 100644 --- a/app/models/metadata_has_many.rb +++ b/app/models/metadata_has_many.rb @@ -42,6 +42,9 @@ class MetadataHasMany < MetadataRelatedPosts return true unless inverse? (had_many - has_many).each do |remove| + # No modificar nada si la relaciĆ³n ya estaba deshecha + next unless remove[inverse]&.value == post.uuid.value + remove[inverse]&.value = remove[inverse].default_value end