Fix: Try to add empty attachment

This commit is contained in:
Emilio Blanco 2011-04-01 08:00:05 -03:00
parent a2bad3c81d
commit 613c79ab31

View file

@ -139,8 +139,10 @@ class WebmailController < ApplicationController
render :action => :mailsent render :action => :mailsent
elsif operation == t(:add) elsif operation == t(:add)
@mail = create_mail @mail = create_mail
attachment = CDF::Attachment.new(@mail) if params['attachment']
attachment.file = params['attachment'] attachment = CDF::Attachment.new(@mail)
attachment.file = params['attachment']
end
else else
# default - new email create # default - new email create
@mail = create_mail @mail = create_mail