5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 09:46:22 +00:00

fix: no modificar la relación si ya estaba deshecha

This commit is contained in:
f 2024-10-23 15:24:16 -03:00
parent 23c9c7dc0d
commit 7ebc171cab
No known key found for this signature in database

View file

@ -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