mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-29 22:26:21 +00:00
Merge branch 'issue-12985' into panel.sutty.nl
This commit is contained in:
commit
5e1dc536f9
1 changed files with 6 additions and 4 deletions
|
@ -50,11 +50,13 @@ class MetadataBelongsTo < MetadataRelatedPosts
|
||||||
end
|
end
|
||||||
|
|
||||||
# No duplicar las relaciones
|
# No duplicar las relaciones
|
||||||
|
if belongs_to.present?
|
||||||
if belongs_to[inverse].respond_to? :has_one
|
if belongs_to[inverse].respond_to? :has_one
|
||||||
belongs_to[inverse].value = post.uuid.value
|
belongs_to[inverse].value = post.uuid.value
|
||||||
else
|
else
|
||||||
belongs_to[inverse].value = (belongs_to[inverse].value.dup << post.uuid.value) unless belongs_to.blank? || included?
|
belongs_to[inverse].value = (belongs_to[inverse].value.dup << post.uuid.value) unless belongs_to.blank? || included?
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue