Drag 'n Drop Inline Images - Fixing Aggressive Error Logging for FileAttachment thumbnail and icon_url Properties

Review Request #6706 — Created Dec. 19, 2014 and submitted

Information

Review Board
master
a39aa9c...

Reviewers

With drag and drop inline images, we've introduced the ability to have a file attachment with a null file field. In this case, we're expecting mimetype_handler to be None (as there is no file).
thumbnail and icon_url can both be accessed when the file attachment does not yet have a file, and we don't want to log an error in this case. So, just return None.

All tests pass. There is no error message being logged to the console when accessing thumbnail or icon_url properties on a file attachment with no file.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/attachments/models.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/attachments/models.py
    
    
  2. 
      
dkus
brennie
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
dkus
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to ucosp/dkus/dnd-inline-images (f138348)
Loading...