5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 07:24:17 +00:00

fix: permitir borrar la imagen sin vaciar la descripción #8347

sin embargo no estamos pudiendo distinguir entre imagen borrada e imagen
sin subir, con lo que perdimos una verificación
This commit is contained in:
f 2022-11-28 19:30:20 -03:00
parent 6c62c20572
commit 4fc2ece2d5

View file

@ -23,7 +23,6 @@ class MetadataFile < MetadataTemplate
errors << I18n.t("metadata.#{type}.site_invalid") if site.invalid?
errors << I18n.t("metadata.#{type}.path_required") if path_missing?
errors << I18n.t("metadata.#{type}.no_file_for_description") if no_file_for_description?
errors << I18n.t("metadata.#{type}.attachment_missing") if path? && !static_file
errors.compact!
@ -134,11 +133,6 @@ class MetadataFile < MetadataTemplate
end
end
# No hay archivo pero se lo describió
def no_file_for_description?
!path? && description?
end
# Obtiene el id del blob asociado
#
# @return [Integer,nil]