mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 20:46: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}.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]
|
||||
|
|
Loading…
Reference in a new issue