Refatorar: remove verificações redundantes de anexos na validação de presença de conteúdo.
This commit is contained in:
parent
c0cd8c24b0
commit
3362df6009
@ -13,7 +13,7 @@ Rails.application.config.to_prepare do
|
||||
def ensure_content_presence_defensive
|
||||
# If content is present, or we have attachments, we are good.
|
||||
# We check .any? and .size to be robust against unsaved attachments in some contexts.
|
||||
return if content.present? || attachments.any? || attachments.size > 0 || attachments.to_a.any?
|
||||
return if content.present? || attachments.any?
|
||||
|
||||
# Identifica a origem para um fallback mais inteligente
|
||||
if incoming?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user