5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 09:36:21 +00:00

fix: poder guardar

This commit is contained in:
f 2023-04-08 17:50:49 -03:00
parent ce7c7ffd96
commit 72dd7e66ad
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ class MetadataBelongsTo < MetadataRelatedPosts
# anterior # anterior
if belonged_to.present? if belonged_to.present?
if belonged_to[inverse].respond_to? :has_one if belonged_to[inverse].respond_to? :has_one
belonged_to[inverse].value = nil belonged_to[inverse].value = ''
else else
belonged_to[inverse].value = belonged_to[inverse].value.reject do |rej| belonged_to[inverse].value = belonged_to[inverse].value.reject do |rej|
rej == post.uuid.value rej == post.uuid.value

View file

@ -17,8 +17,8 @@ class MetadataHasOne < MetadataBelongsTo
return true unless changed? return true unless changed?
return true unless inverse? return true unless inverse?
had_one&.value = nil had_one[inverse]&.value = ''
has_one&.value = post.uuid.value has_one[inverse]&.value = post.uuid.value
true true
end end