mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 09:16:22 +00:00
fix: poder guardar
This commit is contained in:
parent
ce7c7ffd96
commit
72dd7e66ad
2 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ class MetadataBelongsTo < MetadataRelatedPosts
|
|||
# anterior
|
||||
if belonged_to.present?
|
||||
if belonged_to[inverse].respond_to? :has_one
|
||||
belonged_to[inverse].value = nil
|
||||
belonged_to[inverse].value = ''
|
||||
else
|
||||
belonged_to[inverse].value = belonged_to[inverse].value.reject do |rej|
|
||||
rej == post.uuid.value
|
||||
|
|
|
@ -17,8 +17,8 @@ class MetadataHasOne < MetadataBelongsTo
|
|||
return true unless changed?
|
||||
return true unless inverse?
|
||||
|
||||
had_one&.value = nil
|
||||
has_one&.value = post.uuid.value
|
||||
had_one[inverse]&.value = ''
|
||||
has_one[inverse]&.value = post.uuid.value
|
||||
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue