mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 22:26:22 +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:
parent
6c62c20572
commit
4fc2ece2d5
1 changed files with 0 additions and 6 deletions
|
@ -23,7 +23,6 @@ class MetadataFile < MetadataTemplate
|
||||||
|
|
||||||
errors << I18n.t("metadata.#{type}.site_invalid") if site.invalid?
|
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}.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 << I18n.t("metadata.#{type}.attachment_missing") if path? && !static_file
|
||||||
|
|
||||||
errors.compact!
|
errors.compact!
|
||||||
|
@ -134,11 +133,6 @@ class MetadataFile < MetadataTemplate
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# No hay archivo pero se lo describió
|
|
||||||
def no_file_for_description?
|
|
||||||
!path? && description?
|
|
||||||
end
|
|
||||||
|
|
||||||
# Obtiene el id del blob asociado
|
# Obtiene el id del blob asociado
|
||||||
#
|
#
|
||||||
# @return [Integer,nil]
|
# @return [Integer,nil]
|
||||||
|
|
Loading…
Reference in a new issue