Defect #6452

Unhandled exception on creating File

Added by Jan from Planio www.plan.io about 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:2010-09-21
Priority:NormalDue date:
Assignee:Eric Davis% Done:

0%

Category:Attachments
Target version:1.0.2
Resolution:Fixed Affected version:

Description

Creating (uploading) a file yields an unhandled exception in Mailer#attachments_added whenever the attachment fails to be validated (e.g. filesize too large) and email notifications are turned on.

Exception:

NoMethodError: undefined method `container' for nil:NilClass

Relavant stacktrace:

--- 
- "[RAILS_ROOT]/app/models/mailer.rb:110:in `attachments_added'" 
- "[RAILS_ROOT]/app/controllers/files_controller.rb:32:in `create'" 

This patch fixes the problem. Please check and commit.

files_controller_patch.patch Magnifier (698 Bytes) Jan from Planio www.plan.io, 2010-09-21 12:27

Associated revisions

Revision 4177
Added by Jean-Philippe Lang about 7 years ago

Fixed: error on mail notification when adding an invalid file (#6452).

History

#1 Updated by Jan from Planio www.plan.io about 7 years ago

this is an easy one, would be great if it made it into 1.0.2

#2 Updated by Jean-Philippe Lang about 7 years ago

  • Status changed from New to Resolved
  • Target version set to 1.0.2
  • Resolution set to Fixed

Fixed in r4177.

#3 Updated by Jan from Planio www.plan.io about 7 years ago

Thanks :)

#4 Updated by Eric Davis about 7 years ago

  • Status changed from Resolved to Closed

Merged into 1.0-stable

Also available in: Atom PDF