[rbnotefield] Work around a breakage with rendering change entries.

Review Request #6291 — Created Sept. 3, 2014 and submitted

chipx86
rb-extension-pack
3549
a588b37...
rb-extension-pack

Review Board < 2.0.7 breaks when trying to render changes to the Note
field if adding content for the first time after the review request has
already been published. The old value for the field was 'None', which
broke the rendering due to the expectation of strings.

While Review Board 2.0.7 is getting a fix for this, we still want to
work around it for earlier releases. This adds a new
render_change_entry_html() function that just normalizes the values
before calling the parent function, ensuring we're dealing with empty
strings.

Tested without the fix in /r/6290/ and saw that the change could properly
render. Previously, the page was showing a traceback.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbnotefield/rbnotefield/extension.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbnotefield/rbnotefield/extension.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (e41239d)
Loading...