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

fix: romper la relación has_many desde un belongs_to #7537

This commit is contained in:
f 2024-03-25 12:14:16 -03:00
parent 4e0d3f8f3e
commit 35a838afd2
No known key found for this signature in database

View file

@ -225,7 +225,7 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
when 'belongs_to', 'has_one'
if value_was.present?
associated_posts(value_was).each do |remove_post|
remove_relation_from(remove_post[inverse_attribute], value_was)
remove_relation_from(remove_post[inverse_attribute], post.uuid.value)
end
end