5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 07:56:23 +00:00

Merge branch 'issue-12985' into panel.sutty.nl

This commit is contained in:
f 2023-04-10 19:25:56 -03:00
commit 5e1dc536f9

View file

@ -50,10 +50,12 @@ class MetadataBelongsTo < MetadataRelatedPosts
end
# No duplicar las relaciones
if belongs_to[inverse].respond_to? :has_one
belongs_to[inverse].value = post.uuid.value
else
belongs_to[inverse].value = (belongs_to[inverse].value.dup << post.uuid.value) unless belongs_to.blank? || included?
if belongs_to.present?
if belongs_to[inverse].respond_to? :has_one
belongs_to[inverse].value = post.uuid.value
else
belongs_to[inverse].value = (belongs_to[inverse].value.dup << post.uuid.value) unless belongs_to.blank? || included?
end
end
true