Fix: Try to add empty attachment

master-old
Emilio Blanco 2011-04-01 08:00:05 -03:00
parent a2bad3c81d
commit 613c79ab31
1 changed files with 4 additions and 2 deletions

View File

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